Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

chore: bump up rustc version to v1.85.0 (#10515)

renovate91e00f08d0d5
diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml
index 84bcf64642..927849f823 100644
--- a/.github/workflows/build-test.yml
+++ b/.github/workflows/build-test.yml
@@ -309,6 +309,10 @@ jobs:
with:
workspace-copy: true
drive-size: 8GB
+ drive-format: NTFS
+ env-mapping: |
+ CARGO_HOME,{{ DEV_DRIVE }}/.cargo
+ RUSTUP_HOME,{{ DEV_DRIVE }}/.rustup
- name: Setup Node.js
uses: ./.github/actions/setup-node
with:
diff --git a/Cargo.toml b/Cargo.toml
index 5483e78f47..11c579b995 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -8,7 +8,10 @@ members = [
"./packages/frontend/native/schema",
"./packages/frontend/native/sqlite_v1",
]
-resolver = "2"
+resolver = "3"
+
+[workspace.package]
+edition = "2024"
[workspace.dependencies]
affine_common = { path = "./packages/common/native" }
diff --git a/oxlint.json b/oxlint.json
index 91da9d2d11..a6bc2a2ef0 100644
--- a/oxlint.json
+++ b/oxlint.json
@@ -8,7 +8,7 @@
"ignorePatterns": [
"**/node_modules",
".yarn",
- ".github",
+ ".github/helm",
".vscode",
".yarnrc.yml",
".docker",
diff --git a/packages/frontend/native/media_capture/src/macos/screen_capture_kit.rs b/packages/frontend/native/media_capture/src/macos/screen_capture_kit.rs
index 1157501163..4ae6ea6266 100644
--- a/packages/frontend/native/media_capture/src/macos/screen_capture_kit.rs
+++ b/packages/frontend/native/media_capture/src/macos/screen_capture_kit.rs
@@ -76,8 +76,11 @@ unsafe impl Encode for NSRect {
static RUNNING_APPLICATIONS: LazyLock<RwLock<Vec<AudioObjectID>>> =
LazyLock::new(|| RwLock::new(audio_process_list().expect("Failed to get running applications")));
+type ApplicationStateChangedSubscriberMap =
+ HashMap<AudioObjectID, HashMap<Uuid, Arc<ThreadsafeFunction<(), ()>>>>;
+
static APPLICATION_STATE_CHANGED_SUBSCRIBERS: LazyLock<
- RwLock<HashMap<AudioObjectID, HashMap<Uuid, Arc<ThreadsafeFunction<(), ()>>>>>,
+ RwLock<ApplicationStateChangedSubscriberMap>,
> = LazyLock::new(|| RwLock::new(HashMap::new()));
static APPLICATION_STATE_CHANGED_LISTENER_BLOCKS: LazyLock<
@@ -348,10 +351,7 @@ impl TappableApplication {
#[napi(constructor)]
pub fn new(object_id: AudioObjectID) -> Result<Self> {
// Get process ID from object_id
- let process_id = match get_process_property(&object_id, kAudioProcessPropertyPID) {
- Ok(pid) => pid,
- Err(_) => -1,
- };
+ let process_id = get_process_property(&object_id, kAudioProcessPropertyPID).unwrap_or(-1);
// Create base Application
let app = Application::new(process_id)?;
@@ -686,10 +686,7 @@ impl ShareableContent {
#[napi]
pub fn application_with_process_id(&self, process_id: u32) -> Option<Application> {
// Get NSRunningApplication class
- let running_app_class = match NSRUNNING_APPLICATION_CLASS.as_ref() {
- Some(class) => class,
- None => return None,
- };
+ let running_app_class = NSRUNNING_APPLICATION_CLASS.as_ref()?;
// Get running application with PID
let running_app: *mut AnyObject = unsafe {
diff --git a/rust-toolchain.toml b/rust-toolchain.toml
index 5a09b9bb8b..aaba1588e6 100644
--- a/rust-toolchain.toml
+++ b/rust-toolchain.toml
@@ -1,3 +1,3 @@
[toolchain]
-channel = "1.84.1"
+channel = "1.85.0"
profile = "default"