fix: add missing explicit lifetime in ExcelSubrange return type for rust 1.83 build (#353)

seeing some regression build failure when building roapi 0.12.0 against
rust 1.83.0

```
  error: elided lifetime has a name
    --> columnq/src/table/excel.rs:48:10
     |
  41 | impl<'a> ExcelSubrange<'a> {
     |      -- lifetime `'a` declared here
  ...
  48 |     ) -> ExcelSubrange {
     |          ^^^^^^^^^^^^^ this elided lifetime gets resolved as `'a`
     |
  note: the lint level is defined here
    --> columnq/src/lib.rs:1:9
     |
  1  | #![deny(warnings)]
     |         ^^^^^^^^
     = note: `#[deny(elided_named_lifetimes)]` implied by `#[deny(warnings)]`
```

relates to https://github.com/Homebrew/homebrew-core/pull/199379

Signed-off-by: Rui Chen <rui@chenrui.dev>
This commit is contained in:
Rui Chen 2024-12-02 03:51:29 -05:00 committed by GitHub
parent 322bd203bd
commit 85c55c9951
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -45,7 +45,7 @@ impl<'a> ExcelSubrange<'a> {
rows_range_end: Option<usize>,
columns_range_start: Option<usize>,
columns_range_end: Option<usize>,
) -> ExcelSubrange {
) -> ExcelSubrange<'a> {
let rows_range_start = rows_range_start.unwrap_or(usize::MIN);
let rows_range_end = rows_range_end
.or(range.end().map(|v| v.0 as usize))