From 3f14938392a3ce78863a43c5f323b2b1475388ee Mon Sep 17 00:00:00 2001 From: Lei Xu Date: Mon, 1 Apr 2024 21:31:07 -0700 Subject: [PATCH] chore: pass str instead of String to build table names (#1178) --- rust/lancedb/src/connection.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rust/lancedb/src/connection.rs b/rust/lancedb/src/connection.rs index 06bf9c41..e0bcc65a 100644 --- a/rust/lancedb/src/connection.rs +++ b/rust/lancedb/src/connection.rs @@ -101,8 +101,8 @@ impl TableNamesBuilder { /// /// This can be combined with limit to implement pagination by setting this to /// the last table name from the previous page. - pub fn start_after(mut self, start_after: String) -> Self { - self.start_after = Some(start_after); + pub fn start_after(mut self, start_after: impl Into) -> Self { + self.start_after = Some(start_after.into()); self } @@ -862,7 +862,7 @@ mod tests { let tables = db .table_names() - .start_after(names[30].clone()) + .start_after(&names[30]) .execute() .await .unwrap(); @@ -871,7 +871,7 @@ mod tests { let tables = db .table_names() - .start_after(names[30].clone()) + .start_after(&names[30]) .limit(7) .execute() .await