Skip to content

Commit

Permalink
breaking changes migration (#51)
Browse files Browse the repository at this point in the history
* Fix rust_analyzer performance issue

* fix(temp): breaking changes with nightly rust and openai crate
  • Loading branch information
axonasif committed Jul 14, 2023
1 parent 8c49097 commit b1eb3aa
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 17 deletions.
1 change: 0 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{
"rust-analyzer.hover.actions.references.enable": true,
"rust-analyzer.check.command": "clippy"
}
30 changes: 15 additions & 15 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,33 +7,33 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
serde_json = "1.0.95"
serde = { version = "1.0.159", features = ["derive"] }
regex = "1.7.3"
serde_json = "1.0.102"
serde = { version = "1.0.171", features = ["derive"] }
regex = "1.9.1"
urlencoding = "2.1.2"
sqlx = { version = "0.6.3", features = ["runtime-tokio-rustls", "sqlite", "offline"] }
meilisearch-sdk = "0.23.0"
words-count = "0.1.4"
meilisearch-sdk = "0.23.2"
words-count = "0.1.5"
html-escape = "0.2.13"
piston_rs = "0.4.3"
async-trait = "0.1.68"
async-trait = "0.1.71"
duplicate = "1.0.0"
base64 = "0.21.0"
once_cell = "1.17.1"
base64 = "0.21.2"
once_cell = "1.18.0"
color-eyre = "0.6.2"
tracing-subscriber = { version = "0.3.16", features = ["env-filter"] }
tracing-subscriber = { version = "0.3.17", features = ["env-filter"] }
tracing = "0.1.37"
tracing-error = "0.2.0"
toml = "0.7.3"
url = "2.3.1"
toml = "0.7.6"
url = "2.4.0"
fastrand = "1.9.0"
openai = "1.0.0-alpha.8"
openai = { git = "https://github.com/rellfy/openai", rev = "280cf412581d6c5b8e239ce19ae647b877e01838" }
sysinfo = "0.28.4"

[dependencies.reqwest]
default-features = false
features = ["rustls-tls", "json"]
version = "0.11.16"
version = "0.11.18"

[dependencies.serenity]
git = "https://github.com/serenity-rs/serenity"
Expand All @@ -43,10 +43,10 @@ features = ["client", "unstable_discord_api", "gateway", "rustls_backend", "mode
#version = "0.10.10"

[dependencies.tokio]
version = "1.27.0"
version = "1.29.1"
features = ["macros", "rt-multi-thread", "process"]


[dependencies.anyhow]
version = "1.0.70"
version = "1.0.71"
features = ["backtrace"]
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "nightly"
channel = "nightly-2023-06-27"
3 changes: 3 additions & 0 deletions src/utils/index_threads.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ pub struct Thread {
pub author_id: u64,
pub id: u64,
pub guild_id: u64,

pub parent_channel_id: u64,
pub timestamp: i64,
pub date: Timestamp,
Expand Down Expand Up @@ -72,8 +73,10 @@ pub async fn index_thread_messages(
.await?
.user
.face();

// Get tags
// TODO: How to optimize this, and better visualize this problem in mind, ask Thomas.
// IDEA: Map available_tags into a hashmap, id to key and tag to value.
let thread_available_tags = thread_parent_channel_id
.to_channel(&ctx.http)
.await?
Expand Down

0 comments on commit b1eb3aa

Please sign in to comment.