Skip to content

Commit

Permalink
Remove unnecessary qualifications
Browse files Browse the repository at this point in the history
  • Loading branch information
robin-nitrokey committed Apr 3, 2024
1 parent 667d60c commit 20b0acb
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ pub mod request {
Uptime:

Wink:
- duration: core::time::Duration
- duration: Duration

SetCustomStatus:
- status: u8
Expand Down
4 changes: 2 additions & 2 deletions src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -954,7 +954,7 @@ impl<P: Platform, D: Dispatch> Service<P, D> {
}
}

impl<P, D> crate::client::Syscall for &mut Service<P, D>
impl<P, D> Syscall for &mut Service<P, D>
where
P: Platform,
D: Dispatch,
Expand All @@ -964,7 +964,7 @@ where
}
}

impl<P, D> crate::client::Syscall for Service<P, D>
impl<P, D> Syscall for Service<P, D>
where
P: Platform,
D: Dispatch,
Expand Down
1 change: 1 addition & 0 deletions src/tests.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#![cfg(test)]
#![allow(static_mut_refs)]

use chacha20::ChaCha20;

use crate::types::*;
Expand Down
10 changes: 5 additions & 5 deletions src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -447,17 +447,17 @@ impl TryFrom<ShortData> for Letters {
}
}

impl serde::Serialize for Id {
fn serialize<S>(&self, serializer: S) -> core::result::Result<S::Ok, S::Error>
impl Serialize for Id {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
serializer.serialize_bytes(&self.0.to_be_bytes())
}
}

impl<'de> serde::Deserialize<'de> for Id {
fn deserialize<D>(deserializer: D) -> core::result::Result<Self, D::Error>
impl<'de> Deserialize<'de> for Id {
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
Expand All @@ -470,7 +470,7 @@ impl<'de> serde::Deserialize<'de> for Id {
formatter.write_str("16 bytes")
}

fn visit_bytes<E>(self, v: &[u8]) -> core::result::Result<Self::Value, E>
fn visit_bytes<E>(self, v: &[u8]) -> Result<Self::Value, E>
where
E: serde::de::Error,
{
Expand Down

0 comments on commit 20b0acb

Please sign in to comment.