mirror of
https://github.com/launchbadge/sqlx.git
synced 2026-03-19 08:39:44 +00:00
Rename PgLTree::from to from_labels and add From<Vec<PgLTreeLabel>> implementation (#3949)
This commit is contained in:
@@ -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 }
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user