Rollback api address and remove mimalloc
This commit is contained in:
Generated
-19
@@ -2216,7 +2216,6 @@ dependencies = [
|
|||||||
"hex",
|
"hex",
|
||||||
"iced",
|
"iced",
|
||||||
"iced_core",
|
"iced_core",
|
||||||
"mimalloc",
|
|
||||||
"rand",
|
"rand",
|
||||||
"reqwest",
|
"reqwest",
|
||||||
"rhai",
|
"rhai",
|
||||||
@@ -2392,15 +2391,6 @@ version = "0.2.16"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981"
|
checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "libmimalloc-sys"
|
|
||||||
version = "0.1.49"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "6a45a52f43e1c16f667ccfe4dd8c85b7f7c204fd5e3bf46c5b0db9a5c3c0b8e9"
|
|
||||||
dependencies = [
|
|
||||||
"cc",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "libredox"
|
name = "libredox"
|
||||||
version = "0.1.12"
|
version = "0.1.12"
|
||||||
@@ -2546,15 +2536,6 @@ dependencies = [
|
|||||||
"paste",
|
"paste",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "mimalloc"
|
|
||||||
version = "0.1.52"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "2d4139bb28d14ad1facf21d5eb8825051b326e172d216b39f6d31df53cc97862"
|
|
||||||
dependencies = [
|
|
||||||
"libmimalloc-sys",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "mime"
|
name = "mime"
|
||||||
version = "0.3.17"
|
version = "0.3.17"
|
||||||
|
|||||||
+6
-5
@@ -19,7 +19,7 @@ sha2 = "0.11.0"
|
|||||||
tokio = { version = "1.53.1", features = ["rt", "rt-multi-thread", "macros"] }
|
tokio = { version = "1.53.1", features = ["rt", "rt-multi-thread", "macros"] }
|
||||||
hex = "0.4.3"
|
hex = "0.4.3"
|
||||||
zstd = "0.13.3"
|
zstd = "0.13.3"
|
||||||
mimalloc = "0.1.52"
|
#mimalloc = "0.1.52"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
criterion = "0.8.2"
|
criterion = "0.8.2"
|
||||||
@@ -28,7 +28,8 @@ criterion = "0.8.2"
|
|||||||
name = "split_bench" # Имя файла в benches/ без расширения
|
name = "split_bench" # Имя файла в benches/ без расширения
|
||||||
harness = false # Отключаем стандартный тестовый раннер
|
harness = false # Отключаем стандартный тестовый раннер
|
||||||
|
|
||||||
#[profile.release]
|
[profile.super-release]
|
||||||
#codegen-units = 1
|
inherits = "release"
|
||||||
#lto = true
|
codegen-units = 1
|
||||||
#opt-level = 3
|
lto = true
|
||||||
|
opt-level = 3
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
|
use crate::dictionary::app_data_dir;
|
||||||
use std::io;
|
use std::io;
|
||||||
use tokio::fs::{File, OpenOptions};
|
use tokio::fs::{File, OpenOptions};
|
||||||
use tokio::io::{AsyncReadExt, AsyncWriteExt, BufReader};
|
use tokio::io::{AsyncReadExt, AsyncWriteExt};
|
||||||
use zstd::{Decoder, Encoder, DEFAULT_COMPRESSION_LEVEL};
|
use zstd::{Decoder, Encoder, DEFAULT_COMPRESSION_LEVEL};
|
||||||
use crate::dictionary::app_data_dir;
|
|
||||||
|
|
||||||
const API_URL: &str = "http://127.0.0.1:8089/";
|
// const API_URL: &str = "http://127.0.0.1:8089/";
|
||||||
// const API_URL: &str = "https://learning.micialware.ru/";
|
const API_URL: &str = "https://learning.micialware.ru/";
|
||||||
|
|
||||||
pub async fn send_data(id: String) {
|
pub async fn send_data(id: String) {
|
||||||
let path = app_data_dir();
|
let path = app_data_dir();
|
||||||
|
|||||||
+8
-9
@@ -16,27 +16,26 @@ mod word;
|
|||||||
mod writing;
|
mod writing;
|
||||||
mod repetition_settings;
|
mod repetition_settings;
|
||||||
|
|
||||||
use std::collections::HashMap;
|
|
||||||
use chrono::{ NaiveDate};
|
|
||||||
use crate::data_provider::card_sets::load_sets;
|
use crate::data_provider::card_sets::load_sets;
|
||||||
use crate::data_provider::settings::get_setting;
|
use crate::data_provider::settings::get_setting;
|
||||||
|
use crate::data_provider::sqlite::default_connection;
|
||||||
use crate::data_provider::words::{load_word_groups, load_words};
|
use crate::data_provider::words::{load_word_groups, load_words};
|
||||||
use crate::dictionary::app_data_dir;
|
|
||||||
use crate::lang::{WordData, WordGroup};
|
use crate::lang::{WordData, WordGroup};
|
||||||
use crate::navigation::{AppSettings, RootMessage, ScreenState};
|
use crate::navigation::{AppSettings, RootMessage, ScreenState};
|
||||||
use crate::quiz::*;
|
use crate::quiz::*;
|
||||||
use crate::repetitions::CardSetSettings;
|
use crate::repetitions::CardSetSettings;
|
||||||
use crate::RootMessage::Keyboard;
|
use crate::RootMessage::Keyboard;
|
||||||
use iced::{window, Font};
|
use chrono::NaiveDate;
|
||||||
use iced::{keyboard, Subscription, Theme};
|
use iced::{keyboard, Subscription, Theme};
|
||||||
use iced_core::Size;
|
use iced::{window, Font};
|
||||||
use iced_core::window::Position;
|
use iced_core::window::Position;
|
||||||
|
use iced_core::Size;
|
||||||
|
// use mimalloc::MiMalloc;
|
||||||
use rusqlite::Connection;
|
use rusqlite::Connection;
|
||||||
use mimalloc::MiMalloc;
|
use std::collections::HashMap;
|
||||||
use crate::data_provider::sqlite::default_connection;
|
|
||||||
|
|
||||||
#[global_allocator]
|
// #[global_allocator]
|
||||||
static GLOBAL: MiMalloc = MiMalloc;
|
// static GLOBAL: MiMalloc = MiMalloc;
|
||||||
const USER_FONT: Font = Font::with_name("Noto Sans JP");
|
const USER_FONT: Font = Font::with_name("Noto Sans JP");
|
||||||
|
|
||||||
fn main() -> iced::Result {
|
fn main() -> iced::Result {
|
||||||
|
|||||||
+2
-1
@@ -144,8 +144,9 @@ impl SyncState {
|
|||||||
DisableSync => {
|
DisableSync => {
|
||||||
let mut state = self.state.lock().unwrap();
|
let mut state = self.state.lock().unwrap();
|
||||||
state.sync_data.key = None;
|
state.sync_data.key = None;
|
||||||
|
|
||||||
delete_settings("SYNC_KEY".to_string(), &state.connection);
|
delete_settings("SYNC_KEY".to_string(), &state.connection);
|
||||||
|
delete_settings("AUTO_WEB_FETCH".to_string(), &state.connection);
|
||||||
|
|
||||||
}
|
}
|
||||||
SwitchAutoSync => {
|
SwitchAutoSync => {
|
||||||
self.auto_fetch = !self.auto_fetch;
|
self.auto_fetch = !self.auto_fetch;
|
||||||
|
|||||||
Reference in New Issue
Block a user