Skip to content

Commit

Permalink
Update arrayvec, ureq, num-bigint, strum and rust-crypto crates (#449)
Browse files Browse the repository at this point in the history
* Update arrayvec to 0.7

* Update ureq to v2

* Bump num-bigint to 0.4

* Bump strum to 0.21

* Update rust-crypto crates
  • Loading branch information
paolobarbolini authored Aug 17, 2021
1 parent 0eb7f5e commit 32ab106
Show file tree
Hide file tree
Showing 10 changed files with 64 additions and 111 deletions.
145 changes: 49 additions & 96 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion feather/base/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ edition = "2018"
[dependencies]
ahash = "0.4"
anyhow = "1"
arrayvec = { version = "0.5", features = [ "serde" ] }
arrayvec = { version = "0.7", features = [ "serde" ] }
bitflags = "1"
bitvec = "0.21"
blocks = { path = "../blocks", package = "feather-blocks" }
Expand Down
6 changes: 3 additions & 3 deletions feather/base/src/anvil/entity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,11 @@ impl EntityData {
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct BaseEntityData {
#[serde(rename = "Pos")]
pub position: ArrayVec<[f64; 3]>,
pub position: ArrayVec<f64, 3>,
#[serde(rename = "Rotation")]
pub rotation: ArrayVec<[f32; 2]>,
pub rotation: ArrayVec<f32, 2>,
#[serde(rename = "Motion")]
pub velocity: ArrayVec<[f64; 3]>,
pub velocity: ArrayVec<f64, 3>,
}

#[derive(Error, Debug, PartialEq, Eq)]
Expand Down
2 changes: 1 addition & 1 deletion feather/datapacks/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ serde = { version = "1", features = [ "derive" ] }
serde_json = "1"
smartstring = { version = "0.2", features = [ "serde" ] }
thiserror = "1"
ureq = { version = "1", default-features = false, features = [ "tls" ] }
ureq = { version = "2", default-features = false, features = [ "tls" ] }
zip = "0.5"
2 changes: 1 addition & 1 deletion feather/datapacks/src/vanilla.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ fn download_jar(base: &Path) -> anyhow::Result<File> {
log::info!("Downloading vanilla server JAR from {}", JAR_URL);
let mut data = ureq::get(JAR_URL)
.timeout(Duration::from_secs(10))
.call()
.call()?
.into_reader();

let downloaded_dir = base.join("downloaded");
Expand Down
4 changes: 2 additions & 2 deletions feather/protocol/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ authors = [ "caelunshun <[email protected]>" ]
edition = "2018"

[dependencies]
aes = "0.5"
aes = "0.7"
anyhow = "1"
base = { path = "../base", package = "feather-base" }
blocks = { path = "../blocks", package = "feather-blocks" }
bytemuck = "1"
byteorder = "1"
bytes = "0.5"
cfb8 = "0.5"
cfb8 = "0.7"
flate2 = "1"
generated = { path = "../generated", package = "feather-generated" }
hematite-nbt = { git = "https://github.com/PistonDevelopers/hematite_nbt" }
Expand Down
6 changes: 3 additions & 3 deletions feather/protocol/src/codec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use crate::{io::VarInt, ProtocolVersion, Readable, Writeable};
use aes::Aes128;
use bytes::BytesMut;
use cfb8::{
stream_cipher::{NewStreamCipher, StreamCipher},
cipher::{AsyncStreamCipher, NewCipher},
Cfb8,
};
use flate2::{
Expand Down Expand Up @@ -42,7 +42,7 @@ impl MinecraftCodec {
/// Enables encryption with the provided key.
pub fn enable_encryption(&mut self, key: CryptKey) {
// yes, Mojang uses the same nonce for each packet. don't ask me why.
self.cryptor = Some(AesCfb8::new_var(&key, &key).expect("key size is invalid"));
self.cryptor = Some(AesCfb8::new_from_slices(&key, &key).expect("key size is invalid"));
self.crypt_key = Some(key);
}

Expand All @@ -57,7 +57,7 @@ impl MinecraftCodec {
MinecraftCodec {
cryptor: self
.crypt_key
.map(|key| AesCfb8::new_var(&key, &key).expect("key size is invalid")),
.map(|key| AesCfb8::new_from_slices(&key, &key).expect("key size is invalid")),
crypt_key: self.crypt_key,
compression: self.compression,
received_buf: BytesMut::new(),
Expand Down
2 changes: 1 addition & 1 deletion feather/server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ futures-lite = "1"
hematite-nbt = { git = "https://github.com/PistonDevelopers/hematite_nbt" }
log = "0.4"
md-5 = "0.9"
num-bigint = "0.3"
num-bigint = "0.4"
once_cell = "1"
parking_lot = "0.11"
plugin-host = { path = "../plugin-host", package = "feather-plugin-host" }
Expand Down
2 changes: 1 addition & 1 deletion feather/worldgen/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ rand = "0.7"
rand_xorshift = "0.2"
simdnoise = { git = "https://github.com/jackmott/rust-simd-noise", rev = "3a4f3e6" } # needed for https://github.com/jackmott/rust-simd-noise/pull/31 and https://github.com/jackmott/rust-simd-noise/pull/36
smallvec = "1"
strum = "0.19"
strum = "0.21"

[dev-dependencies]
approx = "0.3"
Loading

0 comments on commit 32ab106

Please sign in to comment.