Skip to content

Commit 9b3efbf

Browse files
committed
Add from_labels method
1 parent 005a2d2 commit 9b3efbf

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

sqlx-postgres/src/types/ltree.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,11 @@ impl PgLTree {
9595
Self::default()
9696
}
9797

98+
/// creates ltree from a [`Vec<PgLTreeLabel>`]
99+
pub fn from_labels(labels: Vec<PgLTreeLabel>) -> Self {
100+
Self { labels }
101+
}
102+
98103
/// creates ltree from an iterator with checking labels
99104
// TODO: this should just be removed but I didn't want to bury it in a massive diff
100105
#[deprecated = "renamed to `try_from_iter()`"]

0 commit comments

Comments
 (0)