Skip to content

Commit

Permalink
Rustfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
nickbabcock committed Jul 28, 2024
1 parent d14f10a commit 24df2c0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
7 changes: 3 additions & 4 deletions fuzz/fuzz_targets/fuzz_binary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,7 @@ fuzz_target!(|data: &[u8]| {
_ => {}
}
}
let _: Result<Meta, _> =
jomini::BinaryDeserializer::builder_flavor(BinaryTestFlavor)
.from_tape(&otape, &hash)
.deserialize();
let _: Result<Meta, _> = jomini::BinaryDeserializer::builder_flavor(BinaryTestFlavor)
.from_tape(&otape, &hash)
.deserialize();
});
8 changes: 4 additions & 4 deletions src/binary/resolver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ pub trait TokenResolver {
fn resolve(&self, token: u16) -> Option<&str>;

/// Return whether [`TokenResolver::resolve`] will always return `None`.
///
///
/// By default this returns `false`
///
///
/// This method is not used by jomini itself, but rather targeted at
/// downstream save file libraries, who accept an application configured
/// [`TokenResolver`]. If the application is not configured for ironman
Expand All @@ -43,7 +43,7 @@ pub trait TokenResolver {
/// file libraries can raise a more descriptive "binary file encountered but
/// tokens are not configured", as only they know if a non-zero amount of
/// tokens need to be resolved for a successful deserialization.
///
///
/// There's not a way for jomini to know whether an empty [`TokenResolver`]
/// constitutes an error, as the client may only be deserializing data from
/// keys that are already strings. Or, alternatively, direct token
Expand Down Expand Up @@ -71,7 +71,7 @@ impl<T: TokenResolver> TokenResolver for &'_ T {
fn resolve(&self, token: u16) -> Option<&str> {
(**self).resolve(token)
}

fn is_empty(&self) -> bool {
(**self).is_empty()
}
Expand Down

0 comments on commit 24df2c0

Please sign in to comment.