mirror of
https://github.com/storytold/gridcraft.git
synced 2026-11-20 09:21:41 +01:00
xlsx: clear the two clippy errors the ODS cutover left on main
SheetNames::insert lost its only caller when the ODS reader moved to craft-ods, and craft_ods::Value::Text already holds an Arc<str>.
This commit is contained in:
1 parent
83ab01678a
commit
98ba4e989a
2 files changed
+1
-6
No files matched your search
@@ -103,7 +103,7 @@ fn map_value(v: craft_ods::Value) -> Value {
|
||||
match v {
|
||||
craft_ods::Value::Empty => Value::Empty,
|
||||
craft_ods::Value::Number(n) => Value::Number(n),
|
||||
craft_ods::Value::Text(s) => Value::Text(Arc::from(s)),
|
||||
craft_ods::Value::Text(s) => Value::Text(s),
|
||||
craft_ods::Value::Bool(b) => Value::Bool(b),
|
||||
craft_ods::Value::Error(e) => Value::Error(map_cell_error(e)),
|
||||
}
|
||||
|
||||
@@ -65,11 +65,6 @@ pub(crate) struct SheetNames {
|
||||
}
|
||||
|
||||
impl SheetNames {
|
||||
/// Records `name` as taken.
|
||||
pub(crate) fn insert(&mut self, name: &str) {
|
||||
self.taken.insert(name.to_ascii_lowercase());
|
||||
}
|
||||
|
||||
/// A valid name for the `i`-th sheet based on `name`, not yet taken; it is recorded as taken.
|
||||
pub(crate) fn unique(&mut self, name: &str, i: usize) -> String {
|
||||
let mut base: String = name.chars().filter(|c| !matches!(c, ':' | '\\' | '/' | '?' | '*' | '[' | ']')).take(31).collect();
|
||||
|
||||
Reference in new issue
Block a user