diff --git a/.cargo/config.toml b/.cargo/config.toml index 9efb7a9c5c07..bf125a3eda47 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -12,4 +12,5 @@ rustflags = [ "-Wclippy::print_stdout", "-Wclippy::print_stderr", "-Wclippy::implicit_clone", + "-Aclippy::items_after_test_module", ] diff --git a/.github/workflows/apidoc.yml b/.github/workflows/apidoc.yml index e5247d0de35f..89ac4f25b32f 100644 --- a/.github/workflows/apidoc.yml +++ b/.github/workflows/apidoc.yml @@ -13,7 +13,7 @@ on: name: Build API docs env: - RUST_TOOLCHAIN: nightly-2023-02-26 + RUST_TOOLCHAIN: nightly-2023-05-03 jobs: apidoc: diff --git a/.github/workflows/develop.yml b/.github/workflows/develop.yml index 50f1972dc6f7..72852e4cac63 100644 --- a/.github/workflows/develop.yml +++ b/.github/workflows/develop.yml @@ -24,7 +24,7 @@ on: name: CI env: - RUST_TOOLCHAIN: nightly-2023-02-26 + RUST_TOOLCHAIN: nightly-2023-05-03 jobs: typos: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7fe51c890299..907a23354bbc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,7 +11,7 @@ on: name: Release env: - RUST_TOOLCHAIN: nightly-2023-02-26 + RUST_TOOLCHAIN: nightly-2023-05-03 SCHEDULED_BUILD_VERSION_PREFIX: v0.3.0 diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 14bcfe10cc46..423d5fc9117a 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,2 +1,2 @@ [toolchain] -channel = "nightly-2023-02-26" +channel = "nightly-2023-05-03" diff --git a/src/common/recordbatch/src/util.rs b/src/common/recordbatch/src/util.rs index 8dcb31c8e132..258e113d8524 100644 --- a/src/common/recordbatch/src/util.rs +++ b/src/common/recordbatch/src/util.rs @@ -31,7 +31,6 @@ pub async fn collect_batches(stream: SendableRecordBatchStream) -> Result; fn poll_next(mut self: Pin<&mut Self>, _cx: &mut Context<'_>) -> Poll> { - let batch = mem::replace(&mut self.batch, None); + let batch = self.batch.take(); if let Some(batch) = batch { Poll::Ready(Some(Ok(batch))) diff --git a/src/servers/src/auth/user_provider.rs b/src/servers/src/auth/user_provider.rs index 8c09199e70cb..e161509ca86c 100644 --- a/src/servers/src/auth/user_provider.rs +++ b/src/servers/src/auth/user_provider.rs @@ -54,7 +54,7 @@ impl TryFrom<&str> for StaticUserProvider { let file = File::open(path).context(IoSnafu)?; let credential = io::BufReader::new(file) .lines() - .filter_map(|line| line.ok()) + .map_while(std::result::Result::ok) .filter_map(|line| { if let Some((k, v)) = line.split_once('=') { Some((k.to_string(), v.as_bytes().to_vec())) diff --git a/src/store-api/src/manifest/action.rs b/src/store-api/src/manifest/action.rs index 64605636b910..2fcc9aca2b23 100644 --- a/src/store-api/src/manifest/action.rs +++ b/src/store-api/src/manifest/action.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -///! Common actions for manifest +//! Common actions for manifest use serde::{Deserialize, Serialize}; use crate::manifest::ManifestVersion; diff --git a/src/table-procedure/src/lib.rs b/src/table-procedure/src/lib.rs index ae6713b0b00f..6e637a1798cb 100644 --- a/src/table-procedure/src/lib.rs +++ b/src/table-procedure/src/lib.rs @@ -32,6 +32,7 @@ use table::engine::{TableEngineProcedureRef, TableEngineRef}; /// /// # Panics /// Panics on error. +#[allow(clippy::items_after_test_module)] pub fn register_procedure_loaders( catalog_manager: CatalogManagerRef, engine_procedure: TableEngineProcedureRef,