Skip to content
Merged
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
8 changes: 7 additions & 1 deletion sqlx-postgres/src/types/ltree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ impl PgLTree {
}

/// creates ltree from a [`Vec<PgLTreeLabel>`]
pub fn from(labels: Vec<PgLTreeLabel>) -> Self {
pub fn from_labels(labels: Vec<PgLTreeLabel>) -> Self {
Self { labels }
}

Expand Down Expand Up @@ -138,6 +138,12 @@ impl PgLTree {
}
}

impl From<Vec<PgLTreeLabel>> for PgLTree {
fn from(labels: Vec<PgLTreeLabel>) -> Self {
Self { labels }
}
}

impl FromIterator<PgLTreeLabel> for PgLTree {
fn from_iter<T: IntoIterator<Item = PgLTreeLabel>>(iter: T) -> Self {
Self {
Expand Down
Loading