Fix clippy lint warnings (#1004)

This commit is contained in:
Jack T 2025-01-13 10:07:53 -08:00 • committed by GitHub
parent f33d1f1cc4
commit 55a207a275
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 69 additions and 76 deletions

View file

@ -5,19 +5,13 @@ use serde::Serialize;
/// Enables redacting any value that serializes as a string.
///
/// Used for transforming Rojo instance IDs into something deterministic.
#[derive(Default)]
pub struct RedactionMap {
ids: HashMap<String, usize>,
last_id: usize,
}
impl RedactionMap {
pub fn new() -> Self {
Self {
ids: HashMap::new(),
last_id: 0,
}
}
pub fn get_redacted_value(&self, id: impl ToString) -> Option<String> {
let id = id.to_string();