Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove w and use native Rust to check tty idle times #32

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: implement From trait for CircadianError to handle SystemTimeErro…
…r conversion
sghael committed Aug 31, 2024
commit e5bba4483020d67d2d9da93bc9e37ddda28fb3a3
5 changes: 5 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -137,6 +137,11 @@ impl From<nix::Error> for CircadianError {
CircadianError(error.to_string().to_owned())
}
}
impl From<std::time::SystemTimeError> for CircadianError {
fn from(error: std::time::SystemTimeError) -> Self {
CircadianError(error.to_string().to_owned())
}
}
impl From<time::error::Parse> for CircadianError {
fn from(error: time::error::Parse) -> Self {
CircadianError(error.to_string().to_owned())