Skip to content

Commit

Permalink
Bump rust edition to 2021
Browse files Browse the repository at this point in the history
  • Loading branch information
PolyMeilex committed Dec 28, 2024
1 parent a10151d commit 894893e
Show file tree
Hide file tree
Showing 11 changed files with 3 additions and 18 deletions.
2 changes: 1 addition & 1 deletion oxisynth/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "oxisynth"
version = "0.0.5"
edition = "2018"
edition = "2021"

authors = ["Poly <marynczak.bartlomiej@gmail.com>"]
description = "Rust soundfont synthesizer"
Expand Down
4 changes: 1 addition & 3 deletions oxisynth/src/core/midi.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
use std::convert::{TryFrom, TryInto};

use crate::core::channel_pool::Channel;
use crate::core::font_bank::FontBank;
use crate::core::soundfont::modulator::Mod;
Expand Down Expand Up @@ -428,7 +426,7 @@ pub(in super::super) fn cc(
);
}
// TODO: This is fishy, for some reason those are missing from FluidLite, but
// are pressent in Fluidsynth
// are present in Fluidsynth
// https://github.com/FluidSynth/fluidsynth/blob/fa5173cbaefed60121db057bad7be7686165f7cc/src/synth/fluid_synth.c#L1857

// RPN_TUNING_PROGRAM_CHANGE | RPN_TUNING_BANK_SELECT | RPN_MODULATION_DEPTH_RANGE
Expand Down
2 changes: 0 additions & 2 deletions oxisynth/src/core/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ use self::channel_pool::ChannelPool;
use self::font_bank::FontBank;

use crate::{Settings, SettingsError, SynthDescriptor};
use std::convert::TryInto;

#[derive(Clone)]
struct FxBuf {
pub reverb: [f32; 64],
Expand Down
2 changes: 0 additions & 2 deletions oxisynth/src/core/soundfont/generator.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
use std::convert::TryFrom;

use super::super::Channel;

macro_rules! u8_to_enum {
Expand Down
2 changes: 0 additions & 2 deletions oxisynth/src/core/soundfont/instrument.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
use std::convert::TryFrom as _;

use crate::GeneratorType;

use super::generator::GeneratorList;
Expand Down
2 changes: 0 additions & 2 deletions oxisynth/src/core/soundfont/preset.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
use std::convert::TryFrom as _;

use super::generator::{GeneratorList, GeneratorType};
use super::modulator::Mod;
use super::{instrument::Instrument, Sample};
Expand Down
2 changes: 0 additions & 2 deletions oxisynth/src/settings.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
use std::convert::TryFrom;

pub struct SynthDescriptor {
pub reverb_active: bool,
pub chorus_active: bool,
Expand Down
2 changes: 1 addition & 1 deletion soundfont-rs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "soundfont"
version = "0.1.0"
authors = ["Poly <marynczak.bartlomiej@gmail.com>"]
edition = "2018"
edition = "2021"

description = "sf2 file parser"
keywords = ["sf2","soundfont"]
Expand Down
1 change: 0 additions & 1 deletion soundfont-rs/src/raw/hydra/generator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ use super::super::utils::Reader;
use crate::error::Error;
use crate::riff::{Chunk, ChunkId, ScratchReader};
use crate::SfEnum;
use std::convert::TryFrom;
use std::io::{Read, Seek};

#[derive(Debug, Clone)]
Expand Down
1 change: 0 additions & 1 deletion soundfont-rs/src/raw/hydra/modulator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ use crate::raw::GeneratorType;

use super::super::utils::Reader;
use crate::riff::{Chunk, ChunkId, ScratchReader};
use std::convert::{TryFrom, TryInto};
use std::io::{Read, Seek};

#[derive(Debug, Clone, Copy, PartialEq)]
Expand Down
1 change: 0 additions & 1 deletion soundfont-rs/src/raw/utils.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use crate::error::Error;
use std::convert::TryInto;

pub(crate) struct Reader<'a> {
data: &'a [u8],
Expand Down

0 comments on commit 894893e

Please sign in to comment.