mirror of
https://git.asonix.dog/asonix/activitystreams.git
synced 2024-11-21 19:31:00 +00:00
Clippy nits
This commit is contained in:
parent
b928f8e77f
commit
658f832d08
2 changed files with 12 additions and 9 deletions
|
@ -866,8 +866,7 @@ pub trait ApActorExt: AsApActor {
|
|||
endpoints
|
||||
.nonstandard
|
||||
.values()
|
||||
.map(|v| check_opt(v, authority_opt.as_ref()))
|
||||
.collect::<Result<(), _>>()?;
|
||||
.try_for_each(|v| check_opt(v, authority_opt.as_ref()))?;
|
||||
|
||||
return Ok(Some(endpoints));
|
||||
}
|
||||
|
|
|
@ -222,7 +222,16 @@ impl From<&str> for Unit {
|
|||
|
||||
/// A list of units of length that represent valid units for certain ActivityStreams objects
|
||||
#[derive(
|
||||
Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd, serde::Deserialize, serde::Serialize,
|
||||
Clone,
|
||||
Debug,
|
||||
Default,
|
||||
Eq,
|
||||
Hash,
|
||||
Ord,
|
||||
PartialEq,
|
||||
PartialOrd,
|
||||
serde::Deserialize,
|
||||
serde::Serialize,
|
||||
)]
|
||||
#[serde(untagged)]
|
||||
enum Length {
|
||||
|
@ -238,6 +247,7 @@ enum Length {
|
|||
#[serde(rename = "km")]
|
||||
Kilometers,
|
||||
|
||||
#[default]
|
||||
#[serde(rename = "m")]
|
||||
Meters,
|
||||
}
|
||||
|
@ -276,12 +286,6 @@ impl Length {
|
|||
}
|
||||
}
|
||||
|
||||
impl Default for Length {
|
||||
fn default() -> Self {
|
||||
Length::Meters
|
||||
}
|
||||
}
|
||||
|
||||
impl std::str::FromStr for Length {
|
||||
type Err = LengthError;
|
||||
|
||||
|
|
Loading…
Reference in a new issue