Dock persistence working!
Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
This commit is contained in:
parent
c1f7902309
commit
d20d21c6a2
29 changed files with 783 additions and 443 deletions
|
@ -2,6 +2,7 @@ use std::{
|
|||
ffi::OsStr,
|
||||
os::unix::prelude::OsStrExt,
|
||||
path::{Path, PathBuf},
|
||||
sync::Arc,
|
||||
};
|
||||
|
||||
use anyhow::Result;
|
||||
|
@ -118,6 +119,13 @@ impl Bind for &str {
|
|||
}
|
||||
}
|
||||
|
||||
impl Bind for Arc<str> {
|
||||
fn bind(&self, statement: &Statement, start_index: i32) -> Result<i32> {
|
||||
statement.bind_text(start_index, self.as_ref())?;
|
||||
Ok(start_index + 1)
|
||||
}
|
||||
}
|
||||
|
||||
impl Bind for String {
|
||||
fn bind(&self, statement: &Statement, start_index: i32) -> Result<i32> {
|
||||
statement.bind_text(start_index, self)?;
|
||||
|
@ -125,6 +133,13 @@ impl Bind for String {
|
|||
}
|
||||
}
|
||||
|
||||
impl Column for Arc<str> {
|
||||
fn column(statement: &mut Statement, start_index: i32) -> Result<(Self, i32)> {
|
||||
let result = statement.column_text(start_index)?;
|
||||
Ok((Arc::from(result), start_index + 1))
|
||||
}
|
||||
}
|
||||
|
||||
impl Column for String {
|
||||
fn column<'a>(statement: &mut Statement, start_index: i32) -> Result<(Self, i32)> {
|
||||
let result = statement.column_text(start_index)?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue