Skip to content

Commit 04ca95a

Browse files
authored
Merge pull request #240 from Imberflur/ci-fixes
Fix CI errors
2 parents ad83a56 + 6cce92e commit 04ca95a

File tree

20 files changed

+77
-72
lines changed

20 files changed

+77
-72
lines changed

.github/workflows/ci.yml

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -59,20 +59,21 @@ jobs:
5959
command: test
6060
args: --verbose
6161

62-
miri:
63-
name: "Miri"
64-
runs-on: ubuntu-latest
65-
steps:
66-
- uses: actions/checkout@v3
67-
- name: Install Miri
68-
run: |
69-
rustup toolchain install nightly --component miri
70-
rustup override set nightly
71-
cargo miri setup
72-
- name: Test with Miri
73-
# Miri currently reports leaks in some tests so we disable that check
74-
# here (might be due to ptr-int-ptr in crossbeam-epoch so might be
75-
# resolved in future versions of that crate).
76-
#
77-
# crossbeam-epoch doesn't pass with stacked borrows https://github.com/crossbeam-rs/crossbeam/issues/545
78-
run: MIRIFLAGS="-Zmiri-ignore-leaks -Zmiri-tree-borrows" cargo miri test
62+
# Can't run miri right now https://github.com/crossbeam-rs/crossbeam/issues/1181
63+
#miri:
64+
# name: "Miri"
65+
# runs-on: ubuntu-latest
66+
# steps:
67+
# - uses: actions/checkout@v3
68+
# - name: Install Miri
69+
# run: |
70+
# rustup toolchain install nightly --component miri
71+
# rustup override set nightly
72+
# cargo miri setup
73+
# - name: Test with Miri
74+
# # Miri currently reports leaks in some tests so we disable that check
75+
# # here (might be due to ptr-int-ptr in crossbeam-epoch so might be
76+
# # resolved in future versions of that crate).
77+
# #
78+
# # crossbeam-epoch doesn't pass with stacked borrows https://github.com/crossbeam-rs/crossbeam/issues/545
79+
# run: MIRIFLAGS="-Zmiri-ignore-leaks -Zmiri-tree-borrows" cargo miri test

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ Please see [the benchmark](benches/bench.rs) for a bigger (and useful) example.
6565

6666
### Required Rust version
6767

68-
`1.56.1 stable`
68+
`1.65.0 stable`
6969

7070
## Features
7171

benches/bench.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use std::ops::{Index, IndexMut};
66

77
use cgmath::Vector3;
88
use shred::*;
9-
use test::{black_box, Bencher};
9+
use test::{Bencher, black_box};
1010

1111
#[derive(Debug)]
1212
struct VecStorage<T> {

examples/async.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ struct Data<'a> {
1414
b: Write<'a, ResB>,
1515
}
1616

17+
#[allow(dead_code)]
1718
struct EmptySystem(*mut i8); // System is not thread-safe
1819

1920
impl<'a> System<'a> for EmptySystem {

examples/batch_dispatching.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,14 @@ fn main() {
5353
// Resources
5454

5555
#[derive(Default)]
56+
#[allow(dead_code)]
5657
pub struct PotatoStore(i32);
5758

5859
#[derive(Default)]
60+
#[allow(dead_code)]
5961
pub struct TomatoStore(f32);
6062

6163
/// System that says "Hello!"
62-
6364
pub struct SayHelloSystem;
6465

6566
impl<'a> System<'a> for SayHelloSystem {
@@ -71,7 +72,6 @@ impl<'a> System<'a> for SayHelloSystem {
7172
}
7273

7374
/// System that says "Buy Potato"
74-
7575
pub struct BuyPotatoSystem;
7676

7777
impl<'a> System<'a> for BuyPotatoSystem {
@@ -83,7 +83,6 @@ impl<'a> System<'a> for BuyPotatoSystem {
8383
}
8484

8585
/// System that says "Buy Tomato"
86-
8786
pub struct BuyTomatoSystem;
8887

8988
impl<'a> System<'a> for BuyTomatoSystem {

examples/dyn_sys_data.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,17 @@
44
//! language.
55
//!
66
//! It does that by implementing `DynamicSystemData` and using `MetaTable`.
7+
#![allow(clippy::disallowed_names)]
78

89
extern crate shred;
910

1011
// faster alternative to std's HashMap
1112
use ahash::AHashMap as HashMap;
1213

1314
use shred::{
14-
cell::{AtomicRef, AtomicRefMut},
1515
Accessor, AccessorCow, CastFrom, DispatcherBuilder, DynamicSystemData, MetaTable, Read,
1616
Resource, ResourceId, System, SystemData, World,
17+
cell::{AtomicRef, AtomicRefMut},
1718
};
1819

1920
struct Dependencies {
@@ -188,8 +189,8 @@ fn create_script_sys(res: &World) -> DynamicSystem {
188189
input.writes[0].call_method("foo");
189190
}
190191

191-
let reads = vec!["Bar"];
192-
let writes = vec!["Foo"];
192+
let reads = ["Bar"];
193+
let writes = ["Foo"];
193194

194195
// -- how we create the system --
195196
let table = res.fetch::<ResourceTable>();

examples/multi_batch_dispatching.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,14 @@ fn main() {
5353
// Resources
5454

5555
#[derive(Default)]
56+
#[allow(dead_code)]
5657
pub struct PotatoStore(i32);
5758

5859
#[derive(Default)]
60+
#[allow(dead_code)]
5961
pub struct TomatoStore(f32);
6062

6163
/// System that says "Hello!"
62-
6364
pub struct SayHelloSystem;
6465

6566
impl<'a> System<'a> for SayHelloSystem {
@@ -71,7 +72,6 @@ impl<'a> System<'a> for SayHelloSystem {
7172
}
7273

7374
/// System that says "Buy Potato"
74-
7575
pub struct BuyPotatoSystem;
7676

7777
impl<'a> System<'a> for BuyPotatoSystem {
@@ -83,7 +83,6 @@ impl<'a> System<'a> for BuyPotatoSystem {
8383
}
8484

8585
/// System that says "Buy Tomato"
86-
8786
pub struct BuyTomatoSystem;
8887

8988
impl<'a> System<'a> for BuyTomatoSystem {

examples/par_seq.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,14 @@ struct SysA;
2323
struct SysB;
2424
struct SysC;
2525
struct SysD;
26+
#[allow(dead_code)]
2627
struct SysWithLifetime<'a>(&'a u8);
28+
#[allow(dead_code)]
2729
struct SysLocal(*const u8);
2830

2931
impl_sys!(SysA SysB SysC SysD SysLocal);
3032

31-
impl<'a, 'b> System<'a> for SysWithLifetime<'b> {
33+
impl<'a> System<'a> for SysWithLifetime<'_> {
3234
type SystemData = Read<'a, u64>;
3335

3436
fn run(&mut self, nr: Read<'a, u64>) {

examples/thread_local.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
use shred::{DispatcherBuilder, Read, ResourceId, System, SystemData, World, Write};
1+
#[cfg(not(feature = "shred-derive"))]
2+
use shred::ResourceId;
3+
use shred::{DispatcherBuilder, Read, System, SystemData, World, Write};
24

35
#[derive(Debug, Default)]
46
struct ResA;
@@ -13,6 +15,7 @@ struct Data<'a> {
1315
b: Write<'a, ResB>,
1416
}
1517

18+
#[allow(dead_code)]
1619
struct EmptySystem(*mut i8); // System is not thread-safe
1720

1821
impl<'a> System<'a> for EmptySystem {

src/dispatch/async_dispatcher.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use std::{
22
borrow::Borrow,
3-
sync::{mpsc, Arc, RwLock},
3+
sync::{Arc, RwLock, mpsc},
44
};
55

66
use crate::{
@@ -32,7 +32,7 @@ pub struct AsyncDispatcher<'a, R> {
3232
thread_pool: Arc<RwLock<ThreadPoolWrapper>>,
3333
}
3434

35-
impl<'a, R> AsyncDispatcher<'a, R>
35+
impl<R> AsyncDispatcher<'_, R>
3636
where
3737
R: Borrow<World> + Send + Sync + 'static,
3838
{

0 commit comments

Comments
 (0)