mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2025-07-28 18:58:30 +00:00
apply new rustfmt.toml changes, fix some clippy lints
Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
parent
0317cc8cc5
commit
77e0b76408
296 changed files with 7147 additions and 4300 deletions
|
@ -20,12 +20,15 @@ pub(super) fn implement(item: ItemFn, args: &[Meta]) -> Result<TokenStream> {
|
|||
}
|
||||
|
||||
fn get_receiver(args: &[Meta]) -> Result<Path> {
|
||||
let receiver = &args
|
||||
.first()
|
||||
.ok_or_else(|| Error::new(Span::call_site().into(), "Missing required argument to receiver"))?;
|
||||
let receiver = &args.first().ok_or_else(|| {
|
||||
Error::new(Span::call_site().into(), "Missing required argument to receiver")
|
||||
})?;
|
||||
|
||||
let Meta::Path(receiver) = receiver else {
|
||||
return Err(Error::new(Span::call_site().into(), "First argument is not path to receiver"));
|
||||
return Err(Error::new(
|
||||
Span::call_site().into(),
|
||||
"First argument is not path to receiver",
|
||||
));
|
||||
};
|
||||
|
||||
Ok(receiver.clone())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue