Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
16 changes: 13 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/tinyflows-storage/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ serde_json = { workspace = true }
async-trait = { workspace = true }
tokio = { workspace = true, features = ["rt", "sync"] }
sha2 = "0.11"
ulid = "1"
ulid = "3"
data-encoding = "2"

[dev-dependencies]
Expand Down
4 changes: 2 additions & 2 deletions crates/tinyflows-storage/src/key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,15 +116,15 @@ impl Key {
/// order randomly.
#[must_use]
pub fn ulid() -> Self {
Self(Ulid::new().to_string())
Self(Ulid::generate().to_string())
}

/// A ULID stamped with `timestamp_ms` (Unix epoch milliseconds) and a
/// random tail, for a migration that keeps a record's original creation
/// time in its new id.
#[must_use]
pub fn ulid_at(timestamp_ms: u64) -> Self {
Self(Ulid::from_parts(timestamp_ms, Ulid::new().random()).to_string())
Self(Ulid::from_parts(timestamp_ms, Ulid::generate().random()).to_string())
}

/// The parts this key was built from, unescaped.
Expand Down
Loading