Skip to content

Commit

Permalink
Merge pull request #25 from Amjad50/improve_ci
Browse files Browse the repository at this point in the history
General improvements to CI
  • Loading branch information
Amjad50 authored Oct 23, 2024
2 parents db5be91 + dbec9f3 commit 6dca498
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 12 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ jobs:

- uses: actions/checkout@v4

- name: Format check
run: cargo fmt --all -- --check
- name: Clippy check
run: cargo clippy --all --all-targets --all-features -- -D warnings

# breaks for now since Cargo.lock is in a new version (4)
# - uses: actions-rs/audit-check@v1
# with:
Expand All @@ -52,7 +57,7 @@ jobs:
RUSTC_WRAPPER: "sccache"

# afterwards, upload the report to codecov
- uses: codecov/codecov-action@v1
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: lcov.info
Expand Down
4 changes: 0 additions & 4 deletions plastic_core/src/cartridge/mappers/mapper10.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,6 @@ pub struct Mapper10 {
/// +- Nametable mirroring (0: vertical; 1: horizontal)
mirroring_vertical: bool,

/// ($C000-$DFFE, even)
/// the value to reload `irq_counter` when it reaches zero or when asked
/// to be reloaded from `($C001-$DFFF, odd)`
/// is using CHR RAM?
is_chr_ram: bool,

Expand Down
4 changes: 0 additions & 4 deletions plastic_core/src/cartridge/mappers/mapper9.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,6 @@ pub struct Mapper9 {
/// +- Nametable mirroring (0: vertical; 1: horizontal)
mirroring_vertical: bool,

/// ($C000-$DFFE, even)
/// the value to reload `irq_counter` when it reaches zero or when asked
/// to be reloaded from `($C001-$DFFF, odd)`
/// is using CHR RAM?
is_chr_ram: bool,

Expand Down
2 changes: 1 addition & 1 deletion plastic_core/src/cpu6502/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1443,7 +1443,7 @@ struct WrapperReader<'a, R: Read> {
pub inner: &'a mut R,
}

impl<'a, R: Read> Read for WrapperReader<'a, R> {
impl<R: Read> Read for WrapperReader<'_, R> {
fn read(&mut self, buf: &mut [u8]) -> std::io::Result<usize> {
self.inner.read(buf)
}
Expand Down
6 changes: 6 additions & 0 deletions plastic_core/src/misc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ pub struct MovingAverage {
sum: f64,
}

impl Default for MovingAverage {
fn default() -> Self {
Self::new()
}
}

impl MovingAverage {
pub fn new() -> Self {
Self {
Expand Down
3 changes: 1 addition & 2 deletions plastic_core/src/ppu2c02/sprite.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,8 @@ impl Sprite {

/// for 8x8:
/// use the byte normally as index into the pattern table
///
/// for 8x16:
/// 76543210
/// ||||||||
/// |||||||+- Bank ($0000 or $1000) of tiles
Expand Down

0 comments on commit 6dca498

Please sign in to comment.