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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]