mirror of
https://github.com/launchbadge/sqlx.git
synced 2025-12-29 21:00:54 +00:00
Rename PgLTree::from to from_labels and add From<Vec<PgLTreeLabel>> implementation (#3949)
This commit is contained in:
parent
0849fe3c5c
commit
c01f51330a
@ -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 {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user