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

feat(deps): remove vendored uuidv6 dep #28

Merged
merged 1 commit into from
Oct 30, 2023
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
10 changes: 10 additions & 0 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ sonyflake = "0.2.0"
timeflake-rs = "0.3.0"
ulid = "1.1.0"
uuid7 = "0.7.2"
uuidv6 = "0.1.2"
xid = "1.0.3"
miette = { version = "5.10.0", features = ["fancy"] }

Expand Down
1 change: 0 additions & 1 deletion src/cuid.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use std::io;

use chrono::{Datelike, NaiveDateTime, Timelike};
use cuid;
use pgrx::*;

use crate::common::OrPgxError;
Expand Down
3 changes: 1 addition & 2 deletions src/cuid2.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use cuid2;
use pgrx::*;

/// Generate a random cuid2 UUID
Expand Down Expand Up @@ -28,4 +27,4 @@ mod tests {
let generated = crate::cuid2::idkit_cuid2_generate();
assert_eq!(generated.len(), 24);
}
}
}
2 changes: 1 addition & 1 deletion src/nanoid.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use pgrx::*;
use nanoid::nanoid;
use pgrx::*;

/// Generate a nanoid
#[pg_extern]
Expand Down
8 changes: 2 additions & 6 deletions src/uuid_v6.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
use pgrx::*;

mod vendor;
use vendor::{Node, UUIDv6};
use uuidv6::{self, Node, RawUUIDv6, UUIDv6};

/// Generate a UUID v6
#[pg_extern]
Expand All @@ -21,9 +19,7 @@ fn idkit_uuidv6_generate_text() -> String {
fn idkit_uuidv6_generate_uuid() -> pgrx::Uuid {
let node = Node::new();

// This depends on PR to rust-uuidv6
// see: https://github.com/jedisct1/rust-uuidv6/pull/1
pgrx::Uuid::from_slice(&UUIDv6::new(&node).create_bytes())
pgrx::Uuid::from_slice(&RawUUIDv6::new(&node).create())
.unwrap_or_else(|e| error!("{}", format!("failed to generate/parse uuidv6: {}", e)))
}

Expand Down
147 changes: 0 additions & 147 deletions src/uuid_v6/vendor.rs

This file was deleted.

Loading