Skip to content

Commit 9bb1678

Browse files
authored
Merge pull request #9540 from ClSlaid/rust-nightly-2022-12-15
refactor(ci): bump rust version
2 parents cd1c663 + 70779e1 commit 9bb1678

File tree

98 files changed

+231
-103
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+231
-103
lines changed

rust-toolchain.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[toolchain]
2-
channel = "nightly-2022-11-14"
3-
components = ["rustfmt", "clippy", "rust-src"]
2+
channel = "nightly-2022-12-15"
3+
components = ["rustfmt", "clippy", "rust-src", "miri"]

src/binaries/meta/main.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
#![allow(clippy::uninlined_format_args)]
16+
1517
use std::env;
1618
use std::ops::Deref;
1719
use std::sync::Arc;

src/binaries/metabench/main.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
#![allow(clippy::uninlined_format_args)]
16+
1517
use std::fmt::Debug;
1618
use std::fmt::Display;
1719
use std::sync::Arc;

src/binaries/metactl/main.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
#![allow(clippy::uninlined_format_args)]
16+
1517
mod grpc;
1618
use grpc::export_meta;
1719

src/binaries/query/main.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
#![allow(clippy::uninlined_format_args)]
16+
1517
mod local;
1618

1719
use std::env;

src/common/auth/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
#![allow(clippy::uninlined_format_args)]
16+
1517
pub mod auth;
1618
pub use auth::RefreshableToken;
1719
pub use auth::TokenFile;

src/common/base/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,15 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
#![allow(clippy::uninlined_format_args)]
16+
#![allow(incomplete_features)]
1517
#![feature(allocator_api)]
1618
#![feature(thread_local)]
1719
#![feature(ptr_metadata)]
1820
#![feature(result_flattening)]
1921
#![feature(try_trait_v2)]
2022
#![feature(thread_id_value)]
2123
#![feature(backtrace_frames)]
22-
#![allow(incomplete_features)]
2324
#![feature(alloc_error_hook)]
2425

2526
pub mod base;

src/common/building/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
// limitations under the License.
1414

1515
#![deny(unused_crate_dependencies)]
16+
#![allow(clippy::uninlined_format_args)]
1617

1718
mod git;
1819

src/common/cache/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
#![allow(clippy::uninlined_format_args)]
1516
#[cfg(feature = "heapsize")]
1617
#[cfg(not(target_os = "macos"))]
1718
extern crate heapsize_;

src/common/cache/tests/it/main.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,6 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
#![allow(clippy::uninlined_format_args)]
16+
1517
mod cache;

src/common/exception/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
#![allow(clippy::uninlined_format_args)]
1516
pub mod exception;
1617
mod exception_code;
1718
mod exception_flight;

src/common/grpc/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
#![allow(clippy::uninlined_format_args)]
16+
1517
pub use client_conf::RpcClientConf;
1618
pub use client_conf::RpcClientTlsConfig;
1719
pub use dns_resolver::ConnectionFactory;

src/common/http/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
#![allow(clippy::uninlined_format_args)]
16+
1517
mod debug;
1618
mod health;
1719
mod http_shutdown_handlers;

src/common/io/src/cursor_ext/cursor_read_datetime_ext.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ where T: AsRef<[u8]>
116116
let mut times = Vec::with_capacity(3);
117117
loop {
118118
buf.clear();
119-
let size = self.keep_read(&mut buf, |f| (b'0'..=b'9').contains(&f));
119+
let size = self.keep_read(&mut buf, |f| f.is_ascii_digit());
120120
if size == 0 {
121121
break;
122122
} else {
@@ -145,7 +145,7 @@ where T: AsRef<[u8]>
145145
// ms .microseconds
146146
let dt = if self.ignore_byte(b'.') {
147147
buf.clear();
148-
let size = self.keep_read(&mut buf, |f| (b'0'..=b'9').contains(&f));
148+
let size = self.keep_read(&mut buf, |f| f.is_ascii_digit());
149149
if size == 0 {
150150
return Err(ErrorCode::BadBytes(
151151
"err with parse micros second, format like this:[.123456]",
@@ -215,7 +215,7 @@ where T: AsRef<[u8]>
215215
west_tz: bool,
216216
calc_offset: impl Fn(i64, i64, &DateTime<Tz>) -> Result<DateTime<Tz>>,
217217
) -> Result<DateTime<Tz>> {
218-
let n = self.keep_read(buf, |f| (b'0'..=b'9').contains(&f));
218+
let n = self.keep_read(buf, |f| f.is_ascii_digit());
219219
if n != 2 {
220220
// +0800 will err in there
221221
return Err(ErrorCode::BadBytes(
@@ -226,7 +226,7 @@ where T: AsRef<[u8]>
226226
if (0..15).contains(&hour_offset) {
227227
buf.clear();
228228
self.ignore_byte(b':');
229-
if self.keep_read(buf, |f| (b'0'..=b'9').contains(&f)) != 2 {
229+
if self.keep_read(buf, |f| f.is_ascii_digit()) != 2 {
230230
// +08[other byte]00 will err in there, e.g. +08-00
231231
return Err(ErrorCode::BadBytes(
232232
"err with parse timezone, format like this:[+08:00]",

src/common/io/src/cursor_ext/cursor_read_number_ext.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ pub fn collect_number(buffer: &[u8]) -> (usize, usize) {
5555
index += 1;
5656
}
5757
if point_pos < len {
58-
while index < len && (b'0'..=b'9').contains(&buffer[index]) {
58+
while index < len && buffer[index].is_ascii_digit() {
5959
index += 1;
6060
}
6161
}
@@ -67,7 +67,7 @@ pub fn collect_number(buffer: &[u8]) -> (usize, usize) {
6767
if index < len && (buffer[index] == b'-' || buffer[index] == b'+') {
6868
index += 1
6969
}
70-
while index < len && (b'0'..=b'9').contains(&buffer[index]) {
70+
while index < len && buffer[index].is_ascii_digit() {
7171
index += 1;
7272
}
7373
}

src/common/io/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
// https://github.com/rust-lang/rust-clippy/issues/8334
1616
#![allow(clippy::ptr_arg)]
17+
#![allow(clippy::uninlined_format_args)]
1718
#![feature(can_vector)]
1819
#![feature(read_buf)]
1920
#![feature(slice_internals)]

src/common/io/tests/it/main.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
// See the License for the specific language governing permissions and
1414
// limitations under the License.
15+
#![allow(clippy::uninlined_format_args)]
1516

1617
mod binary_read;
1718
mod binary_write;

src/common/jsonb/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
#![allow(clippy::uninlined_format_args)]
16+
1517
mod constants;
1618
mod de;
1719
mod error;

src/common/metrics/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
#![allow(clippy::uninlined_format_args)]
16+
1517
pub mod counter;
1618
mod dump;
1719
mod recorder;

src/common/storage/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
//! - Table snapshots, segments cache must be stored accessed via cache operator.
2929
//! - Intermediate data generated by query could be stored by temporary operator.
3030
31+
#![allow(clippy::uninlined_format_args)]
3132
#![feature(no_sanitize)]
3233
#![feature(io_error_other)]
3334

src/common/tracing/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
#![allow(clippy::uninlined_format_args)]
1516
#![deny(unused_crate_dependencies)]
1617

1718
#[macro_use]

src/meta/api/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
#![allow(clippy::uninlined_format_args)]
1516
#![deny(unused_crate_dependencies)]
1617
extern crate common_meta_types;
1718

src/meta/app/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
//! Types in this crate will not be used directly by databend-meta.
1919
//! But instead, they are used by the caller of meta-client, e.g, databend-query.
2020
21+
#![allow(clippy::uninlined_format_args)]
2122
#![deny(unused_crate_dependencies)]
2223

2324
pub mod schema;

src/meta/client/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
#![allow(clippy::uninlined_format_args)]
16+
1517
mod grpc_action;
1618
mod grpc_client;
1719
mod kv_api_impl;

src/meta/client/tests/it/main.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
14+
#![allow(clippy::uninlined_format_args)]
15+
1416
mod grpc_client;
1517
mod grpc_server;
1618

src/meta/embedded/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
//! `MetaEmbedded` behave exactly the same as a metasrv without distributed logs(raft), since it is driven by
2020
//! a embedded raft `StateMachine`.
2121
22+
#![allow(clippy::uninlined_format_args)]
23+
2224
mod kv_api_impl;
2325
mod meta_embedded;
2426

src/meta/proto-conv/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
// For use of const fn: `Option::<T>::unwrap` at compile time.
1616
#![feature(const_option)]
17+
#![allow(clippy::uninlined_format_args)]
1718

1819
//! Provides conversion from and to protobuf defined meta data, which is used for transport.
1920
//!

src/meta/proto-conv/tests/it/main.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
#![allow(clippy::uninlined_format_args)]
16+
1517
#[macro_use]
1618
pub(crate) mod common;
1719
mod datatype;

src/meta/protos/build.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
//
1515
// https://github.com/rust-lang/rustfmt/blob/e1ab878ccb24cda1b9e1c48865b375230385fede/build.rs
1616

17+
#![allow(clippy::uninlined_format_args)]
18+
1719
use std::env;
1820
use std::fs;
1921
use std::io::Error;

src/meta/raft-store/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
#![allow(clippy::uninlined_format_args)]
16+
1517
pub mod config;
1618
pub mod key_spaces;
1719
pub mod log;

src/meta/raft-store/tests/it/main.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
#![allow(clippy::uninlined_format_args)]
16+
1517
mod log;
1618
#[macro_use]
1719
mod testing;

src/meta/service/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
#![allow(clippy::uninlined_format_args)]
16+
1517
pub mod api;
1618
pub mod configs;
1719
pub mod export;

src/meta/service/tests/it/main.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
// Because the compiler complains about recursion limit for a trait requirement check...
1616
// error[[E0275](https://doc.rust-lang.org/error-index.html#E0275)]: overflow evaluating the requirement `(...)`
1717
// When compiling `impl KVApiBuilder<MetaGrpcClient> for Builder`.
18+
#![allow(clippy::uninlined_format_args)]
1819
#![recursion_limit = "1024"]
1920
#![feature(extend_one)]
2021
mod api;

src/meta/sled-store/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
#![allow(clippy::uninlined_format_args)]
16+
1517
//! sled_store implement a key-value like store backed by sled::Tree.
1618
//!
1719
//! It is used by raft for log and state machine storage.

src/meta/sled-store/tests/it/main.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
#![allow(clippy::uninlined_format_args)]
16+
1517
mod sled_tree;
1618
mod sled_txn_tree;
1719
mod testing;

src/meta/types/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
#![allow(clippy::uninlined_format_args)]
1516
#![feature(provide_any)]
1617

1718
//! This crate defines data types used in meta data storage service.

src/query/ast/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414

1515
// TODO(xuanwo): Add crate level documents here.
1616

17+
#![allow(clippy::uninlined_format_args)]
18+
1719
mod error;
1820

1921
pub use error::Backtrace;

0 commit comments

Comments
 (0)