Skip to content

Commit

Permalink
remove unnecessary lowercase and reference
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyle Carow authored and Kyle Carow committed Jan 4, 2024
1 parent 52ff027 commit 6e2d09c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions rust/fastsim-core/src/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,11 @@ pub trait SerdeAPI: Serialize + for<'a> Deserialize<'a> {
let extension = filepath
.extension()
.and_then(OsStr::to_str)
.with_context(|| format!("File extension could not be parsed: {filepath:?}"))?
.to_lowercase();
.with_context(|| format!("File extension could not be parsed: {filepath:?}"))?;
let file = crate::resources::RESOURCES_DIR
.get_file(filepath)
.with_context(|| format!("File not found in resources: {filepath:?}"))?;
let mut deserialized = Self::from_reader(file.contents(), &extension)?;
let mut deserialized = Self::from_reader(file.contents(), extension)?;
deserialized.init()?;
Ok(deserialized)
}
Expand Down

0 comments on commit 6e2d09c

Please sign in to comment.