Skip to content

Commit 9ef85ef

Browse files
authored
Fix a few clippy lints (#340)
1 parent 3c4cc04 commit 9ef85ef

File tree

8 files changed

+7
-13
lines changed

8 files changed

+7
-13
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ jobs:
99
strategy:
1010
matrix:
1111
rust_version: [default, minimum, beta]
12+
fail-fast: false
1213
timeout-minutes: 30
1314
permissions:
1415
id-token: "write"

edgedb-protocol/src/client_message.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ pub enum ClientMessage {
2727

2828
use std::collections::HashMap;
2929
use std::convert::TryFrom;
30-
use std::u16;
3130

3231
use bytes::{Buf, BufMut, Bytes};
3332
use snafu::{ensure, OptionExt};

edgedb-protocol/src/encoding.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
use std::collections::HashMap;
22
use std::convert::TryFrom;
33
use std::ops::{Deref, DerefMut, RangeBounds};
4-
use std::u32;
54

65
use bytes::{Buf, BufMut, Bytes, BytesMut};
76
use snafu::{ensure, OptionExt, ResultExt};

edgedb-protocol/src/model/json.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ impl Json {
99
/// Two examples of use:
1010
///
1111
/// 1) To construct values with the data received from the
12-
/// database, because we trust database to produce valid JSON.
12+
/// database, because we trust database to produce valid JSON.
1313
///
1414
/// 2) By client users who are using data that is guaranteed
15-
/// to be valid JSON. If unsure, using a method such as serde_json's
16-
/// [to_string](https://docs.rs/serde_json/latest/serde_json/ser/fn.to_string.html) to
17-
/// construct a String is highly recommended.
15+
/// to be valid JSON. If unsure, using a method such as serde_json's
16+
/// [to_string](https://docs.rs/serde_json/latest/serde_json/ser/fn.to_string.html)
17+
/// to construct a String is highly recommended.
1818
///
1919
/// When used in a client query method, EdgeDB itself will recognize if the
2020
/// String inside `Json` is invalid JSON by returning `InvalidValueError:

edgedb-protocol/src/model/time.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -985,10 +985,7 @@ mod test {
985985
assert_eq!(Src { micros: -1000 }.abs_duration(), Trg::new(0, 1000000));
986986
assert_eq!(Src { micros: -1000000 }.abs_duration(), Trg::new(1, 0));
987987
assert_eq!(
988-
Src {
989-
micros: i64::min_value()
990-
}
991-
.abs_duration(),
988+
Src { micros: i64::MIN }.abs_duration(),
992989
Trg::new(9223372036854, 775808000)
993990
);
994991
}

edgedb-protocol/src/server_message.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ pub enum ServerMessage {
2727

2828
use std::collections::HashMap;
2929
use std::convert::{TryFrom, TryInto};
30-
use std::u16;
31-
use std::u32;
3230

3331
use bytes::{Buf, BufMut, Bytes};
3432
use snafu::{ensure, OptionExt};

edgedb-protocol/src/value.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ impl SparseObject {
105105
/// Note: this method has two limitations:
106106
/// 1. Shape created uses `AtMostOne` cardinality for all the elements.
107107
/// 2. There are no extra shape elements
108+
///
108109
/// Both of these are irrelevant when serializing the object.
109110
pub fn from_pairs<N: ToString, V: Into<Option<Value>>>(
110111
iter: impl IntoIterator<Item = (N, V)>,

edgedb-protocol/tests/codecs.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ extern crate pretty_assertions;
33

44
use std::error::Error;
55
use std::sync::Arc;
6-
use std::{i16, i32, i64};
76

87
use bytes::Bytes;
98

0 commit comments

Comments
 (0)