odysa commented on code in PR #186:
URL: https://github.com/apache/iceberg-rust/pull/186#discussion_r1477382004


##########
crates/iceberg/src/catalog/mod.rs:
##########
@@ -25,16 +25,16 @@ use crate::spec::{
 };
 use crate::table::Table;
 use crate::{Error, ErrorKind, Result};
-use async_trait::async_trait;
 use std::collections::HashMap;
 use std::mem::take;
 use std::ops::Deref;
 use typed_builder::TypedBuilder;
 use uuid::Uuid;
 
 /// The catalog API for Iceberg Rust.
-#[async_trait]
-pub trait Catalog: std::fmt::Debug {
+/// see https://blog.rust-lang.org/2023/12/21/async-fn-rpit-in-traits.html
+#[trait_variant::make(Catalog: Send)]
+pub trait LocalCatalog: std::fmt::Debug {

Review Comment:
   My goal was to minimize code changes as much as possible. There are 13 
methods and 2 implementations of `Catalog`, while `trait_variant` is a one-line 
change. I personally prefer `async fn` over `impl Future` since it looks 
neater.  But it is true that `LocalCatalog` is never used.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to