Skip to content

Commit

Permalink
fix: clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
greenhat616 committed Jan 9, 2025
1 parent 899421e commit 7322a7e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion nyanpasu_ipc/src/api/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ pub struct R<'a, T: Serialize + DeserializeOwned + Debug> {
pub ts: i64,
}

impl<'a, T: Serialize + DeserializeOwned + Debug> R<'a, T> {
impl<T: Serialize + DeserializeOwned + Debug> R<'_, T> {
pub fn ok(self) -> Result<Self, IoError> {
if self.code == ResponseCode::Ok {
Ok(self)
Expand Down
2 changes: 1 addition & 1 deletion nyanpasu_service/src/cmds/rpc/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ pub async fn rpc(commands: RpcCommand) -> Result<(), crate::cmds::CommandError>
.set_dns(&NetworkSetDnsReq {
dns_servers: dns_servers
.as_ref()
.map(|v| v.into_iter().map(|v| Cow::Borrowed(v)).collect()),
.map(|v| v.iter().map(Cow::Borrowed).collect()),
})
.await
.map_err(|e| crate::cmds::CommandError::Other(e.into()))?;
Expand Down
2 changes: 1 addition & 1 deletion nyanpasu_service/src/server/instance.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use nyanpasu_ipc::{api::status::CoreState, utils::get_current_ts};
use nyanpasu_utils::core::{
instance::{self, CoreInstance, CoreInstanceBuilder},
instance::{CoreInstance, CoreInstanceBuilder},
CommandEvent, CoreType,
};
use parking_lot::Mutex;
Expand Down
2 changes: 1 addition & 1 deletion nyanpasu_service/src/server/logger.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ impl<'n> Logger<'n> {
}
}

impl<'a> std::io::Write for Logger<'a> {
impl std::io::Write for Logger<'_> {
fn write(&mut self, buf: &[u8]) -> std::io::Result<usize> {
let mut buffer = self.buffer.lock();
let msg = String::from_utf8_lossy(buf);
Expand Down

0 comments on commit 7322a7e

Please sign in to comment.