mirror of
https://git.ngram.ca/OpenJam/rc-servers
synced 2026-08-23 23:08:52 +00:00
Prefix all crates with oj_ and use release version of dependencies
This commit is contained in:
@@ -140,8 +140,8 @@ fn ticks_from_now(time: &chrono::DateTime<chrono::Utc>) -> i64 {
|
||||
.unwrap_or_else(|| dur.num_milliseconds() * 1_000_000 / 100)
|
||||
}
|
||||
|
||||
impl std::convert::From<rc_factory::VehicleQueryInfo> for ItemResult {
|
||||
fn from(value: rc_factory::VehicleQueryInfo) -> Self {
|
||||
impl std::convert::From<oj_rc_factory::VehicleQueryInfo> for ItemResult {
|
||||
fn from(value: oj_rc_factory::VehicleQueryInfo) -> Self {
|
||||
Self {
|
||||
id: value.id,
|
||||
name: value.name,
|
||||
@@ -182,8 +182,8 @@ impl ItemData {
|
||||
}
|
||||
}
|
||||
|
||||
impl std::convert::From<rc_factory::VehicleInfo> for ItemData {
|
||||
fn from(value: rc_factory::VehicleInfo) -> Self {
|
||||
impl std::convert::From<oj_rc_factory::VehicleInfo> for ItemData {
|
||||
fn from(value: oj_rc_factory::VehicleInfo) -> Self {
|
||||
Self {
|
||||
index: value.id,
|
||||
cube_data: value.cube_data,
|
||||
|
||||
@@ -40,23 +40,23 @@ pub enum SanctionType {
|
||||
}
|
||||
|
||||
impl SanctionType {
|
||||
pub(crate) fn from_db(t: rc_database::schema::sanction::Descriptor) -> Self {
|
||||
pub(crate) fn from_db(t: oj_rc_database::schema::sanction::Descriptor) -> Self {
|
||||
match t {
|
||||
rc_database::schema::sanction::Descriptor::Warn => Self::Warning,
|
||||
rc_database::schema::sanction::Descriptor::Mute => Self::Mute,
|
||||
rc_database::schema::sanction::Descriptor::Ban => Self::Suspension,
|
||||
rc_database::schema::sanction::Descriptor::Note => Self::Note,
|
||||
rc_database::schema::sanction::Descriptor::Kick => Self::Kick,
|
||||
oj_rc_database::schema::sanction::Descriptor::Warn => Self::Warning,
|
||||
oj_rc_database::schema::sanction::Descriptor::Mute => Self::Mute,
|
||||
oj_rc_database::schema::sanction::Descriptor::Ban => Self::Suspension,
|
||||
oj_rc_database::schema::sanction::Descriptor::Note => Self::Note,
|
||||
oj_rc_database::schema::sanction::Descriptor::Kick => Self::Kick,
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn to_db(self) -> rc_database::schema::sanction::Descriptor {
|
||||
pub(crate) fn to_db(self) -> oj_rc_database::schema::sanction::Descriptor {
|
||||
match self {
|
||||
Self::Warning => rc_database::schema::sanction::Descriptor::Warn,
|
||||
Self::Mute => rc_database::schema::sanction::Descriptor::Mute,
|
||||
Self::Suspension => rc_database::schema::sanction::Descriptor::Ban,
|
||||
Self::Note => rc_database::schema::sanction::Descriptor::Note,
|
||||
Self::Kick => rc_database::schema::sanction::Descriptor::Kick,
|
||||
Self::Warning => oj_rc_database::schema::sanction::Descriptor::Warn,
|
||||
Self::Mute => oj_rc_database::schema::sanction::Descriptor::Mute,
|
||||
Self::Suspension => oj_rc_database::schema::sanction::Descriptor::Ban,
|
||||
Self::Note => oj_rc_database::schema::sanction::Descriptor::Note,
|
||||
Self::Kick => oj_rc_database::schema::sanction::Descriptor::Kick,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user