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