Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita6fd520

Browse files
Merge pull request#1272 from paolobarbolini/chores
Various chores
2 parentsdd291a4 +861736e commita6fd520

File tree

15 files changed

+47
-61
lines changed

15 files changed

+47
-61
lines changed

‎.github/workflows/ci.yml‎

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ jobs:
1717
name:rustfmt
1818
runs-on:ubuntu-latest
1919
steps:
20-
-uses:actions/checkout@v3
20+
-uses:actions/checkout@v5
2121
-uses:sfackler/actions/rustup@master
2222
-uses:sfackler/actions/rustfmt@master
2323

2424
clippy:
2525
name:clippy
2626
runs-on:ubuntu-latest
2727
steps:
28-
-uses:actions/checkout@v3
28+
-uses:actions/checkout@v5
2929
-uses:sfackler/actions/rustup@master
3030
-run:echo "version=$(rustc --version)" >> $GITHUB_OUTPUT
3131
id:rust-version
@@ -36,12 +36,12 @@ jobs:
3636
restore-keys:|
3737
index-${{ runner.os }}-
3838
-run:cargo generate-lockfile
39-
-uses:actions/cache@v3
39+
-uses:actions/cache@v4
4040
with:
4141
path:~/.cargo/registry/cache
4242
key:registry-${{ runner.os }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }}
4343
-run:cargo fetch
44-
-uses:actions/cache@v3
44+
-uses:actions/cache@v4
4545
with:
4646
path:target
4747
key:clippy-target-${{ runner.os }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }}y
@@ -51,24 +51,24 @@ jobs:
5151
name:check-wasm32
5252
runs-on:ubuntu-latest
5353
steps:
54-
-uses:actions/checkout@v3
54+
-uses:actions/checkout@v5
5555
-uses:sfackler/actions/rustup@master
5656
-run:echo "version=$(rustc --version)" >> $GITHUB_OUTPUT
5757
id:rust-version
5858
-run:rustup target add wasm32-unknown-unknown
59-
-uses:actions/cache@v3
59+
-uses:actions/cache@v4
6060
with:
6161
path:~/.cargo/registry/index
6262
key:index-${{ runner.os }}-${{ github.run_number }}
6363
restore-keys:|
6464
index-${{ runner.os }}-
6565
-run:cargo generate-lockfile
66-
-uses:actions/cache@v3
66+
-uses:actions/cache@v4
6767
with:
6868
path:~/.cargo/registry/cache
6969
key:registry-${{ runner.os }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }}
7070
-run:cargo fetch
71-
-uses:actions/cache@v3
71+
-uses:actions/cache@v4
7272
with:
7373
path:target
7474
key:check-wasm32-target-${{ runner.os }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }}
@@ -80,26 +80,26 @@ jobs:
8080
name:test
8181
runs-on:ubuntu-latest
8282
steps:
83-
-uses:actions/checkout@v4
83+
-uses:actions/checkout@v5
8484
-run:docker compose up -d
8585
-uses:sfackler/actions/rustup@master
8686
with:
8787
version:1.81.0
8888
-run:echo "version=$(rustc --version)" >> $GITHUB_OUTPUT
8989
id:rust-version
90-
-uses:actions/cache@v3
90+
-uses:actions/cache@v4
9191
with:
9292
path:~/.cargo/registry/index
9393
key:index-${{ runner.os }}-${{ github.run_number }}
9494
restore-keys:|
9595
index-${{ runner.os }}-
9696
-run:cargo generate-lockfile
97-
-uses:actions/cache@v3
97+
-uses:actions/cache@v4
9898
with:
9999
path:~/.cargo/registry/cache
100100
key:registry-${{ runner.os }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }}
101101
-run:cargo fetch
102-
-uses:actions/cache@v3
102+
-uses:actions/cache@v4
103103
with:
104104
path:target
105105
key:test-target-${{ runner.os }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }}y

‎postgres-derive/Cargo.toml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ authors = ["Steven Fackler <sfackler@palantir.com>"]
55
license ="MIT OR Apache-2.0"
66
edition ="2021"
77
description ="An internal crate used by postgres-types"
8-
repository ="https://github.com/sfackler/rust-postgres"
8+
repository ="https://github.com/rust-postgres/rust-postgres"
9+
rust-version ="1.81"
910

1011
[lib]
1112
proc-macro =true

‎postgres-native-tls/Cargo.toml‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,9 @@ authors = ["Steven Fackler <sfackler@gmail.com>"]
55
edition ="2021"
66
license ="MIT OR Apache-2.0"
77
description ="TLS support for tokio-postgres via native-tls"
8-
repository ="https://github.com/sfackler/rust-postgres"
8+
repository ="https://github.com/rust-postgres/rust-postgres"
99
readme ="../README.md"
10-
11-
[badges]
12-
circle-ci = {repository ="sfackler/rust-postgres" }
10+
rust-version ="1.81"
1311

1412
[features]
1513
default = ["runtime"]

‎postgres-openssl/Cargo.toml‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,9 @@ authors = ["Steven Fackler <sfackler@gmail.com>"]
55
edition ="2021"
66
license ="MIT OR Apache-2.0"
77
description ="TLS support for tokio-postgres via openssl"
8-
repository ="https://github.com/sfackler/rust-postgres"
8+
repository ="https://github.com/rust-postgres/rust-postgres"
99
readme ="../README.md"
10-
11-
[badges]
12-
circle-ci = {repository ="sfackler/rust-postgres" }
10+
rust-version ="1.81"
1311

1412
[features]
1513
default = ["runtime"]

‎postgres-protocol/CHANGELOG.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,4 +134,4 @@
134134

135135
Look at the[release tags] for information about older releases.
136136

137-
[release tags]:https://github.com/sfackler/rust-postgres/releases
137+
[release tags]:https://github.com/rust-postgres/rust-postgres/releases

‎postgres-protocol/Cargo.toml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ authors = ["Steven Fackler <sfackler@gmail.com>"]
55
edition ="2021"
66
description ="Low level Postgres protocol APIs"
77
license ="MIT OR Apache-2.0"
8-
repository ="https://github.com/sfackler/rust-postgres"
8+
repository ="https://github.com/rust-postgres/rust-postgres"
99
readme ="../README.md"
10+
rust-version ="1.81"
1011

1112
[features]
1213
default = []

‎postgres-protocol/src/types/mod.rs‎

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -639,11 +639,10 @@ impl<'a> FallibleIterator for ArrayValues<'a> {
639639
let val =if len <0{
640640
None
641641
}else{
642-
ifself.buf.len() < lenasusize{
643-
returnErr("invalid value length".into());
644-
}
645-
646-
let(val, buf) =self.buf.split_at(lenasusize);
642+
let(val, buf) =self
643+
.buf
644+
.split_at_checked(lenasusize)
645+
.ok_or("invalid value length")?;
647646
self.buf = buf;
648647
Some(val)
649648
};
@@ -771,10 +770,7 @@ fn read_bound<'a>(
771770
None
772771
}else{
773772
let len = lenasusize;
774-
if buf.len() < len{
775-
returnErr("invalid message size".into());
776-
}
777-
let(value, tail) = buf.split_at(len);
773+
let(value, tail) = buf.split_at_checked(len).ok_or("invalid message size")?;
778774
*buf = tail;
779775
Some(value)
780776
};

‎postgres-types/Cargo.toml‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@ authors = ["Steven Fackler <sfackler@gmail.com>"]
55
edition ="2021"
66
license ="MIT OR Apache-2.0"
77
description ="Conversions between Rust and Postgres values"
8-
repository ="https://github.com/sfackler/rust-postgres"
8+
repository ="https://github.com/rust-postgres/rust-postgres"
99
readme ="../README.md"
1010
keywords = ["database","postgres","postgresql","sql"]
1111
categories = ["database"]
12+
rust-version ="1.81"
1213

1314
[features]
1415
derive = ["postgres-derive"]
@@ -49,8 +50,8 @@ chrono-04 = { version = "0.4.16", package = "chrono", default-features = false,
4950
cidr-02 = {version ="0.2",package ="cidr",optional =true }
5051
cidr-03 = {version ="0.3",package ="cidr",optional =true }
5152
# eui48-04 will stop compiling and support will be removed
52-
# See https://github.com/sfackler/rust-postgres/issues/1073
53-
eui48-04 = {version ="0.4",package ="eui48",optional =true }
53+
# See https://github.com/rust-postgres/rust-postgres/issues/1073
54+
eui48-04 = {version ="0.4.6",package ="eui48",optional =true }
5455
eui48-1 = {version ="1.0",package ="eui48",optional =true,default-features =false }
5556
geo-types-06 = {version ="0.6",package ="geo-types",optional =true }
5657
geo-types-0_7 = {version ="0.7.8",package ="geo-types",optional =true }

‎postgres-types/src/eui48_04.rs‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@ impl<'a> FromSql<'a> for MacAddress {
1616

1717
implToSqlforMacAddress{
1818
fnto_sql(&self, _:&Type,w:&mutBytesMut) ->Result<IsNull,Box<dynError +Sync +Send>>{
19-
letmut bytes =[0;6];
20-
bytes.copy_from_slice(self.as_bytes());
21-
types::macaddr_to_sql(bytes, w);
19+
types::macaddr_to_sql(self.to_array(), w);
2220
Ok(IsNull::No)
2321
}
2422

‎postgres-types/src/eui48_1.rs‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@ impl<'a> FromSql<'a> for MacAddress {
1616

1717
implToSqlforMacAddress{
1818
fnto_sql(&self, _:&Type,w:&mutBytesMut) ->Result<IsNull,Box<dynError +Sync +Send>>{
19-
letmut bytes =[0;6];
20-
bytes.copy_from_slice(self.as_bytes());
21-
types::macaddr_to_sql(bytes, w);
19+
types::macaddr_to_sql(self.to_array(), w);
2220
Ok(IsNull::No)
2321
}
2422

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp