Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: Remove use of legacy numeric constants #1089

Merged
merged 1 commit into from
Jul 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:

env:
PROTOC_VERSION: 3.20.3
clippy_rust_version: 1.78
clippy_rust_version: 1.79

jobs:
# Depends on all actions that are required for a "successful" CI run.
Expand Down
2 changes: 0 additions & 2 deletions prost-types/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ mod protobuf;

use core::convert::TryFrom;
use core::fmt;
use core::i32;
use core::i64;
use core::str::FromStr;
use core::time;

Expand Down
3 changes: 0 additions & 3 deletions prost/src/encoding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ use alloc::vec::Vec;
use core::cmp::min;
use core::mem;
use core::str;
use core::u32;
use core::usize;

use ::bytes::{Buf, BufMut, Bytes};

Expand Down Expand Up @@ -1350,7 +1348,6 @@ mod test {
use alloc::string::ToString;
use core::borrow::Borrow;
use core::fmt::Debug;
use core::u64;

use ::bytes::BytesMut;
use proptest::{prelude::*, test_runner::TestCaseResult};
Expand Down
2 changes: 1 addition & 1 deletion prost/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ pub fn length_delimiter_len(length: usize) -> usize {
/// delimiter, and typically the buffer should be considered corrupt.
pub fn decode_length_delimiter(mut buf: impl Buf) -> Result<usize, DecodeError> {
let length = decode_varint(&mut buf)?;
if length > usize::max_value() as u64 {
if length > usize::MAX as u64 {
return Err(DecodeError::new(
"length delimiter exceeds maximum usize value",
));
Expand Down
Loading