You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The usage of derive attribute is inconsistent now. And should be fixed.
There are two approaches applying attribute.
In some cases it preceded doc blocks:
#[derive(Clone,Debug, serde::Serialize, serde::Deserialize)]/// Represents the result of a database query////// # Examples/// ```/// # async fn f() {/// # use libsql_kt::Config;/// let db = libsql_kt::SyncClient::in_memory().unwrap();/// let rs = db.execute("create table example(num integer, str text)").unwrap();/// assert_eq!(rs.columns.is_empty(), true);/// assert_eq!(rs.rows.is_empty(), true);/// assert_eq!(rs.rows_affected, 0);/// assert_eq!(rs.last_insert_rowid, None);/// db.execute("insert into example (num, str) values (0, 'zero')").unwrap();/// let rs = db.execute("select * from example").unwrap();/// assert_eq!(rs.columns, ["num", "str"]);/// assert_eq!(rs.rows.len(), 1)/// # }/// ```pubstructResultSet{/// name of the columns present in this `ResultSet`.pubcolumns:Vec<String>,/// One entry per row returned from the database. See [Row] for details.pubrows:Vec<Row>,/// How many rows were changed by this statementpubrows_affected:u64,/// the rowid for last insertion. See <https://www.sqlite.org/c3ref/last_insert_rowid.html> for/// detailspublast_insert_rowid:Option<i64>,}
In other it is applied after doc blocks:
/// A generic client struct, wrapping possible backends./// It's a convenience struct which allows implementing connect()/// with backends being passed as env parameters.#[derive(Debug)]pubenumClient{#[cfg(feature = "local_backend")]Local(crate::local::Client),#[cfg(any( feature = "reqwest_backend", feature = "workers_backend", feature = "spin_backend"))]Http(crate::http::Client),#[cfg(feature = "hrana_backend")]Hrana(crate::hrana::Client),Default,}
Team has to choose single approach
Derive attribute usages should be updated in correspondence with the chosen style. (In best case some linting/re-formatting rule applied).
The text was updated successfully, but these errors were encountered:
The usage of
derive
attribute is inconsistent now. And should be fixed.There are two approaches applying attribute.
In some cases it preceded doc blocks:
In other it is applied after doc blocks:
The text was updated successfully, but these errors were encountered: