mirror of
https://git.asonix.dog/asonix/activitystreams.git
synced 2024-11-22 03:40:59 +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
|
endpoints
|
||||||
.nonstandard
|
.nonstandard
|
||||||
.values()
|
.values()
|
||||||
.map(|v| check_opt(v, authority_opt.as_ref()))
|
.try_for_each(|v| check_opt(v, authority_opt.as_ref()))?;
|
||||||
.collect::<Result<(), _>>()?;
|
|
||||||
|
|
||||||
return Ok(Some(endpoints));
|
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
|
/// A list of units of length that represent valid units for certain ActivityStreams objects
|
||||||
#[derive(
|
#[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)]
|
#[serde(untagged)]
|
||||||
enum Length {
|
enum Length {
|
||||||
|
@ -238,6 +247,7 @@ enum Length {
|
||||||
#[serde(rename = "km")]
|
#[serde(rename = "km")]
|
||||||
Kilometers,
|
Kilometers,
|
||||||
|
|
||||||
|
#[default]
|
||||||
#[serde(rename = "m")]
|
#[serde(rename = "m")]
|
||||||
Meters,
|
Meters,
|
||||||
}
|
}
|
||||||
|
@ -276,12 +286,6 @@ impl Length {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for Length {
|
|
||||||
fn default() -> Self {
|
|
||||||
Length::Meters
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl std::str::FromStr for Length {
|
impl std::str::FromStr for Length {
|
||||||
type Err = LengthError;
|
type Err = LengthError;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue