Skip to content

Commit

Permalink
Merge pull request #131 from luukvanderduim/fix-build-instructions
Browse files Browse the repository at this point in the history
Fix build instructions
  • Loading branch information
TTWNO authored Mar 6, 2024
2 parents efd02b7 + a36619d commit 8ca0181
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 15 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ To build odilia, copy paste the following on your command line . The following s
```shell
git clone https://github.com/odilia-app/odilia && \
cd odilia && \
cargo build --release && \
cargo install --path odilia
```

Expand Down
1 change: 1 addition & 0 deletions cache/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ smartstring = { version = "1.0.1", features = ["serde"] }

[dev-dependencies]
criterion = { version = "0.4.0", features = ["async_tokio", "html_reports"] }
atspi-connection.workspace = true
rand = "0.8.5"
serde_json.workspace = true
tokio = { workspace = true, features = ["rt-multi-thread"] }
Expand Down
22 changes: 11 additions & 11 deletions cache/benches/load_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ use std::{
time::Duration,
};

use atspi::accessible::Accessible;
use atspi_client::AccessibilityConnection;
use atspi_connection::AccessibilityConnection;
use atspi_proxies::accessible::Accessible;
use criterion::{criterion_group, criterion_main, BatchSize, BenchmarkId, Criterion};
use odilia_cache::{AccessiblePrimitive, Cache, CacheItem};

Expand All @@ -23,13 +23,13 @@ macro_rules! load_items {
/// This is different from `add` in that it postpones populating references
/// until after all items have been added.
fn add_all(cache: &Cache, items: Vec<CacheItem>) {
cache.add_all(items);
let _ = cache.add_all(items);
}

/// Load the given items into cache via repeated `Cache::add`.
fn add(cache: &Cache, items: Vec<CacheItem>) {
for item in items {
cache.add(item);
let _ = cache.add(item);
}
}

Expand All @@ -43,8 +43,8 @@ async fn traverse_up_refs(children: Vec<Arc<RwLock<CacheItem>>>) {
loop {
let item_ref_copy = Arc::clone(&item_ref);
let mut item = item_ref_copy.write().expect("Could not lock item");
let root_ = ROOT_A11Y.clone();
if matches!(&item.object.id, root_) {
let _root = ROOT_A11Y;
if matches!(&item.object.id, _root) {
break;
}
item_ref = item.parent_ref().expect("Could not get parent reference");
Expand All @@ -71,8 +71,8 @@ async fn traverse_up(children: Vec<CacheItem>) {
panic!("Odilia error {:?}", e);
}
};
let root_ = ROOT_A11Y.clone();
if matches!(item.object.id.clone(), root_) {
let _root = ROOT_A11Y;
if matches!(item.object.id.clone(), _root) {
break;
}
}
Expand All @@ -93,7 +93,7 @@ async fn reads_while_writing(cache: Cache, ids: Vec<AccessiblePrimitive>, items:
let cache_1 = Arc::new(cache);
let cache_2 = Arc::clone(&cache_1);
let mut write_handle = tokio::spawn(async move {
cache_1.add_all(items);
let _ = cache_1.add_all(items);
});
let mut read_handle = tokio::spawn(async move {
let mut ids = VecDeque::from(ids);
Expand Down Expand Up @@ -196,7 +196,7 @@ fn cache_benchmark(c: &mut Criterion) {
item
})
.collect();
cache.add_all(all_items);
let _ = cache.add_all(all_items);
let children = cache
.by_id
.iter()
Expand All @@ -222,7 +222,7 @@ fn cache_benchmark(c: &mut Criterion) {
b.to_async(&rt).iter_batched(
|| {
children.iter()
.map(|am| Arc::clone(&am).read().unwrap().clone())
.map(|am| Arc::clone(am).read().unwrap().clone())
.collect()
},
|cs| async { traverse_up(cs).await },
Expand Down
1 change: 1 addition & 0 deletions cache/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
clippy::unwrap_used,
unsafe_code
)]
#![allow(clippy::multiple_crate_versions)]

use std::{
collections::HashMap,
Expand Down
2 changes: 1 addition & 1 deletion common/src/types.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use atspi_common::Granularity;
use serde::{self, Deserialize, Serialize};
use serde::{Deserialize, Serialize};
use zbus::zvariant::OwnedObjectPath;

pub type Accessible = (String, OwnedObjectPath);
Expand Down
1 change: 1 addition & 0 deletions input/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
clippy::unwrap_used,
unsafe_code
)]
#![allow(clippy::multiple_crate_versions)]

use eyre::Context;
use nix::unistd::Uid;
Expand Down
2 changes: 0 additions & 2 deletions odilia-notify/src/notification.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ impl TryFrom<Arc<Message>> for Notification {
}
#[cfg(test)]
mod tests {
use zbus::names::UniqueName;

use super::*;
#[test]
fn correctly_formatted_message_leads_to_a_correct_notification() -> Result<(), zbus::Error>
Expand Down
1 change: 1 addition & 0 deletions tts/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
clippy::unwrap_used,
unsafe_code
)]
#![allow(clippy::multiple_crate_versions)]

use eyre::Context;
use ssip_client_async::{
Expand Down

0 comments on commit 8ca0181

Please sign in to comment.