Skip to content

Commit

Permalink
lint: cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
canewsin committed Jan 30, 2024
1 parent ac2f51b commit bab2de6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions src/core/site.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,7 @@ impl Site {
}

pub fn content(&self, inner_path: Option<&str>) -> Option<&Content> {
self.content
.get(inner_path.unwrap_or("content.json"))
self.content.get(inner_path.unwrap_or("content.json"))
}

pub fn content_mut(&mut self, inner_path: Option<&str>) -> Option<&mut Content> {
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/websocket/handlers/users.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,9 @@ pub fn handle_cert_set(ws: &mut ZeruWebsocket, command: &Command) -> Result<Mess
},
Value::Object(params) => match params.get("domain") {
Some(Value::String(provider)) => Ok(provider.clone()),
_ => Err(())
_ => Err(()),
},
_ => Err(())
_ => Err(()),
};
if provider.is_err() {
return Err(Error {
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/websocket/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ impl ZeruWebsocket {
} else if let CommandType::Admin(cmd) = &command.cmd {
if !self.is_admin_site()? {
let mut cmd_str = serde_json::to_string(&command.cmd)?;
cmd_str = cmd_str.replace('"', "");
cmd_str = cmd_str.replace('"', "");
return Err(Error {
error: format!("You don't have permission to run {}", cmd_str),
});
Expand Down

0 comments on commit bab2de6

Please sign in to comment.