Skip to content

Commit

Permalink
fix clippy warn
Browse files Browse the repository at this point in the history
  • Loading branch information
rink1969 committed Mar 26, 2024
1 parent 5b4cf8d commit b2568cb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cloud-util/src/graceful_shutdown.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ pub fn graceful_shutdown() -> flume::Receiver<()> {
tokio::spawn(async move {
if let Ok(exit_type) = rx_exit.recv_async().await {
match exit_type {
ExitType::Signal(_) => info!("exit by: {exit_type:?}"),
ExitType::Panic => eprintln!("exit by: {exit_type:?}"),
ExitType::Signal(signal_n) => info!("exit by: signal {}!", signal_n),
ExitType::Panic => eprintln!("exit by: panic!"),
}
drop(tx);
}
Expand Down
3 changes: 3 additions & 0 deletions cloud-util/src/wal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ impl Wal {
let mut ifs = OpenOptions::new()
.read(true)
.create(true)
.truncate(true)
.write(true)
.open(file_path)
.await?;
Expand Down Expand Up @@ -119,6 +120,7 @@ impl Wal {
let fs = OpenOptions::new()
.read(true)
.create(true)
.truncate(true)
.write(true)
.open(last_file_path)
.await?;
Expand Down Expand Up @@ -197,6 +199,7 @@ impl Wal {
.read(true)
.write(true)
.create(true)
.truncate(true)
.open(filename)
.await?;
entry.insert(fs);
Expand Down

0 comments on commit b2568cb

Please sign in to comment.