Bump deps and remove js_int now imported from ruma
This commit is contained in:
parent
89cfb1967a
commit
6c26da97a6
12
Cargo.toml
12
Cargo.toml
@ -11,16 +11,13 @@ license = "MIT"
|
|||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
repository = "https://github.com/ruma/state-res"
|
repository = "https://github.com/ruma/state-res"
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
itertools = "0.9.0"
|
itertools = "0.9.0"
|
||||||
js_int = "0.1.9"
|
serde = { version = "1.0.117", features = ["derive"] }
|
||||||
serde = { version = "1.0.115", features = ["derive"] }
|
serde_json = "1.0.60"
|
||||||
serde_json = "1.0.57"
|
tracing = "0.1.22"
|
||||||
tracing = "0.1.19"
|
|
||||||
maplit = "1.0.2"
|
maplit = "1.0.2"
|
||||||
thiserror = "1.0.20"
|
thiserror = "1.0.22"
|
||||||
tracing-subscriber = "0.2.11"
|
|
||||||
|
|
||||||
[dependencies.ruma]
|
[dependencies.ruma]
|
||||||
git = "https://github.com/ruma/ruma"
|
git = "https://github.com/ruma/ruma"
|
||||||
@ -47,6 +44,7 @@ unstable-pre-spec = ["ruma/unstable-pre-spec"]
|
|||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
criterion = "0.3.3"
|
criterion = "0.3.3"
|
||||||
rand = "0.7.3"
|
rand = "0.7.3"
|
||||||
|
tracing-subscriber = "0.2.15"
|
||||||
|
|
||||||
[[bench]]
|
[[bench]]
|
||||||
name = "state_res_bench"
|
name = "state_res_bench"
|
||||||
|
@ -748,7 +748,7 @@ pub fn get_send_level(
|
|||||||
.events
|
.events
|
||||||
.get(&e_type)
|
.get(&e_type)
|
||||||
.cloned()
|
.cloned()
|
||||||
.unwrap_or_else(|| js_int::int!(50))
|
.unwrap_or_else(|| ruma::int!(50))
|
||||||
.into();
|
.into();
|
||||||
let state_def: i64 = content.state_default.into();
|
let state_def: i64 = content.state_default.into();
|
||||||
let event_def: i64 = content.events_default.into();
|
let event_def: i64 = content.events_default.into();
|
||||||
@ -774,7 +774,7 @@ pub fn can_send_invite(
|
|||||||
let invite_level = auth_events
|
let invite_level = auth_events
|
||||||
.get(&key)
|
.get(&key)
|
||||||
.map_or_else(
|
.map_or_else(
|
||||||
|| Ok::<_, Error>(js_int::int!(50)),
|
|| Ok::<_, Error>(ruma::int!(50)),
|
||||||
|power_levels| {
|
|power_levels| {
|
||||||
power_levels
|
power_levels
|
||||||
.deserialize_content::<PowerLevelsEventContent>()
|
.deserialize_content::<PowerLevelsEventContent>()
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
use std::{collections::BTreeMap, time::SystemTime};
|
use std::{collections::BTreeMap, time::SystemTime};
|
||||||
|
|
||||||
use js_int::UInt;
|
|
||||||
use ruma::{
|
use ruma::{
|
||||||
events::{
|
events::{
|
||||||
from_raw_json_value,
|
from_raw_json_value,
|
||||||
@ -10,7 +9,7 @@ use ruma::{
|
|||||||
},
|
},
|
||||||
serde::CanonicalJsonValue,
|
serde::CanonicalJsonValue,
|
||||||
signatures::reference_hash,
|
signatures::reference_hash,
|
||||||
EventId, RoomId, RoomVersionId, ServerName, UserId,
|
EventId, RoomId, RoomVersionId, ServerName, UInt, UserId,
|
||||||
};
|
};
|
||||||
use serde::{de, ser, Deserialize, Serialize};
|
use serde::{de, ser, Deserialize, Serialize};
|
||||||
use serde_json::value::RawValue as RawJsonValue;
|
use serde_json::value::RawValue as RawJsonValue;
|
||||||
@ -59,6 +58,7 @@ pub struct Requester<'a> {
|
|||||||
pub sender: &'a UserId,
|
pub sender: &'a UserId,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: This no longer needs to be an enum now that PduStub is gone
|
||||||
#[derive(Clone, Debug)]
|
#[derive(Clone, Debug)]
|
||||||
pub enum StateEvent {
|
pub enum StateEvent {
|
||||||
Full(EventId, Pdu),
|
Full(EventId, Pdu),
|
||||||
@ -369,7 +369,6 @@ mod test {
|
|||||||
assert_eq!(
|
assert_eq!(
|
||||||
match &pdu {
|
match &pdu {
|
||||||
StateEvent::Full(id, _) => id,
|
StateEvent::Full(id, _) => id,
|
||||||
_ => panic!("Stub found"),
|
|
||||||
},
|
},
|
||||||
&ruma::event_id!("$Sfx_o8eLfo4idpTO8_IGrKSPKoRMC1CmQugVw9tu_MU")
|
&ruma::event_id!("$Sfx_o8eLfo4idpTO8_IGrKSPKoRMC1CmQugVw9tu_MU")
|
||||||
);
|
);
|
||||||
@ -384,7 +383,6 @@ mod test {
|
|||||||
assert_eq!(
|
assert_eq!(
|
||||||
match &pdu {
|
match &pdu {
|
||||||
StateEvent::Full(id, _) => id,
|
StateEvent::Full(id, _) => id,
|
||||||
_ => panic!("Stub found"),
|
|
||||||
},
|
},
|
||||||
&ruma::event_id!("$Sfx_o8eLfo4idpTO8_IGrKSPKoRMC1CmQugVw9tu_MU")
|
&ruma::event_id!("$Sfx_o8eLfo4idpTO8_IGrKSPKoRMC1CmQugVw9tu_MU")
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user