Skip to content

Commit

Permalink
use Into<String> for with_sheet_name
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickomatic committed Nov 6, 2024
1 parent afeb41e commit 7ab5320
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/a1/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
//! * [Refer to Cells and Ranges by Using A1 Notation](https://learn.microsoft.com/en-us/office/vba/excel/concepts/cells-and-ranges/refer-to-cells-and-ranges-by-using-a1-notation)
//!
use crate::RangeOrCell;
use std::str;

mod display;
mod from_str;
Expand Down Expand Up @@ -73,9 +72,9 @@ impl A1 {
}

/// Clone into a new `A1` with the given `sheet_name`
pub fn with_sheet_name(self, sheet_name: &str) -> Self {
pub fn with_sheet_name<S: Into<String>>(self, sheet_name: S) -> Self {
Self {
sheet_name: Some(sheet_name.to_owned()),
sheet_name: Some(sheet_name.into()),
..self
}
}
Expand Down

0 comments on commit 7ab5320

Please sign in to comment.