Skip to content

Commit

Permalink
add(doc): changelog entry + fmt + clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
ActuallyHappening committed Feb 6, 2025
1 parent d42ad11 commit 8becb7d
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ Upon updating Pueue and restarting the daemon, the previous state will be wiped,
Pueue now allows editing all properties a task in one editor session. There're two modes to do so: `toml` and `files`.
- Revisited, fixed and cleaned up CLI help texts.
- Print most of Pueue's info/log messages to `stderr`. Only keep useful stuff like json and task log output on `stdout`.
- **Breaking** Uses `color-eyre` for a generic error type instead of `anyhow`, potentially breaking library users

### Add

Expand Down
7 changes: 4 additions & 3 deletions pueue/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ pub mod tracing {
fmt::time::OffsetTime, layer::SubscriberExt, util::SubscriberInitExt, EnvFilter, Layer,
};

// idea: use local time zone?
pub fn install_tracing(verbosity: u8) -> Result<()> {
let mut pretty = false;
let level = match verbosity {
Expand All @@ -36,13 +35,15 @@ pub mod tracing {
}
};

type GenericLayer<S> = Box<dyn Layer<S> + Send + Sync>;
let offset = time::UtcOffset::current_local_offset().expect("should get local offset!");
// todo: only log error and continue instead of panicing?
let offset =
time::UtcOffset::current_local_offset().wrap_err("should get local offset!")?;
let timer = OffsetTime::new(
offset,
time::macros::format_description!("[hour]:[minute]:[second]"),
);

type GenericLayer<S> = Box<dyn Layer<S> + Send + Sync>;
let fmt_layer: GenericLayer<_> = match pretty {
false => Box::new(tracing_subscriber::fmt::layer().with_timer(timer)),
true => Box::new(
Expand Down
1 change: 0 additions & 1 deletion pueue/tests/daemon/integration/restore.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use crate::prelude::*;


use pueue_lib::network::message::TaskSelection;
use pueue_lib::state::GroupStatus;

Expand Down
1 change: 0 additions & 1 deletion pueue/tests/daemon/integration/shutdown.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use crate::prelude::*;


use crate::helper::*;

/// Spin up the daemon and send a SIGTERM shortly afterwards.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use crate::prelude::*;


use pueue_lib::{network::message::TaskSelection, state::PUEUE_DEFAULT_GROUP, task::Task};

use crate::helper::*;
Expand Down
2 changes: 1 addition & 1 deletion pueue_lib/tests/settings_backward_compatibility.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::path::PathBuf;

use color_eyre::{Result, eyre::WrapErr};
use color_eyre::{eyre::WrapErr, Result};

use pueue_lib::settings::Settings;

Expand Down

0 comments on commit 8becb7d

Please sign in to comment.