Skip to content

Commit

Permalink
Resolve clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Ortham committed Jun 24, 2024
1 parent 4c8c886 commit f6588e6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion ffi/src/plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ pub unsafe extern "C" fn esp_plugin_resolve_record_ids(
let plugins_metadata = if plugins_metadata.is_null() {
&[]
} else {
(&*plugins_metadata).as_slice()
(*plugins_metadata).as_slice()
};

match plugin.resolve_record_ids(plugins_metadata) {
Expand Down
10 changes: 5 additions & 5 deletions src/plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,7 @@ fn hashed_masters_for_starfield(
for master in masters {
let master_scale = masters_metadata
.iter()
.find(|m| unicase::eq(&m.filename, &master))
.find(|m| unicase::eq(&m.filename, master))
.map(|m| m.scale)
.ok_or_else(|| Error::PluginMetadataNotFound(master.clone()))?;

Expand Down Expand Up @@ -746,7 +746,7 @@ fn read_morrowind_record_ids<R: BufRead + Seek>(reader: &mut R) -> Result<Record
Ok(record_ids.into())
}

fn parse_record_ids<'a>(input: &'a [u8], game_id: GameId) -> IResult<&'a [u8], RecordIds> {
fn parse_record_ids(input: &[u8], game_id: GameId) -> IResult<&[u8], RecordIds> {
if game_id == GameId::Morrowind {
parse_morrowind_record_ids(input)
} else {
Expand All @@ -764,11 +764,11 @@ fn read_record_ids<R: BufRead + Seek>(reader: &mut R, game_id: GameId) -> Result
}
}

fn parse_plugin<'a>(
input: &'a [u8],
fn parse_plugin(
input: &[u8],
game_id: GameId,
load_header_only: bool,
) -> IResult<&'a [u8], PluginData> {
) -> IResult<&[u8], PluginData> {
let (input1, header_record) = Record::parse(input, game_id, false)?;

if load_header_only {
Expand Down

0 comments on commit f6588e6

Please sign in to comment.