release: 0.9.0 - import, export, rust upgrade
This commit is contained in:
parent
eb1bafad2d
commit
d6d9a876a3
5 changed files with 8 additions and 9 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -1543,7 +1543,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "mostr"
|
||||
version = "0.8.0"
|
||||
version = "0.9.0"
|
||||
dependencies = [
|
||||
"base64 0.22.1",
|
||||
"chrono",
|
||||
|
|
|
@ -5,7 +5,7 @@ repository = "https://forge.ftt.gmbh/janek/mostr"
|
|||
readme = "README.md"
|
||||
license = "GPL 3.0"
|
||||
authors = ["melonion"]
|
||||
version = "0.8.0"
|
||||
version = "0.9.0"
|
||||
rust-version = "1.82"
|
||||
edition = "2021"
|
||||
default-run = "mostr"
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
[toolchain]
|
||||
channel = "1.82.0"
|
||||
channel = "1.84.0"
|
||||
|
|
|
@ -134,10 +134,8 @@ pub fn format_as_datetime<F>(stamp: &Timestamp, formatter: F) -> String
|
|||
where
|
||||
F: Fn(DateTime<Local>) -> String,
|
||||
{
|
||||
match Local.timestamp_opt(stamp.as_u64() as i64 + 1, 0) {
|
||||
Single(time) => formatter(time),
|
||||
_ => stamp.to_human_datetime().to_string(),
|
||||
}
|
||||
Local.timestamp_opt(stamp.as_u64() as i64 + 1, 0).earliest()
|
||||
.map_or_else(|| stamp.to_human_datetime().to_string(), formatter)
|
||||
}
|
||||
|
||||
/// Format nostr Timestamp relative to local time
|
||||
|
|
|
@ -683,7 +683,7 @@ async fn main() -> Result<()> {
|
|||
None => tasks.move_to(None),
|
||||
Some(arg) => {
|
||||
let pos = tasks.get_position_timestamped();
|
||||
let time = pos.1.and_then(|_| Local.timestamp_millis_opt(pos.0.as_u64() as i64 * 1000).earliest());
|
||||
let time = pos.1.and_then(|_| Local.timestamp_opt(pos.0.as_u64() as i64, 0).earliest());
|
||||
if parse_tracking_stamp(arg, time)
|
||||
.and_then(|stamp| tasks.track_at(stamp, None)).is_some() {
|
||||
println!("{}", tasks.times_tracked(15));
|
||||
|
@ -714,7 +714,8 @@ async fn main() -> Result<()> {
|
|||
tasks.set_view_depth(depth);
|
||||
}
|
||||
_ => {
|
||||
tasks.filter_or_create(pos, &remaining).map(|id| tasks.move_to(Some(id)));
|
||||
tasks.filter_or_create(pos, &remaining)
|
||||
.map(|id| tasks.move_to(Some(id)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue