feat: BufferNode also From<&str>

This commit is contained in:
əlemi 2024-02-09 00:59:04 +01:00
parent 47127bbb41
commit e0d4360d09

View file

@ -199,6 +199,12 @@ pub mod proto {
} }
} }
impl From<&str> for BufferNode {
fn from(value: &str) -> Self {
BufferNode { path: value.to_string() }
}
}
impl From<BufferNode> for String { impl From<BufferNode> for String {
fn from(value: BufferNode) -> Self { fn from(value: BufferNode) -> Self {
value.path value.path