浏览代码

Fix bounds for deserialization of wav::Audio.

mitchmindtree 8 年之前
父节点
当前提交
239c8a8cc4
共有 1 个文件被更改,包括 2 次插入3 次删除
  1. 2 3
      src/serde.rs

+ 2 - 3
src/serde.rs

@@ -914,7 +914,6 @@ mod sampler {
 mod wav_audio {
     extern crate find_folder;
 
-    use hound;
     use map::wav;
     use sample;
     use super::serde;
@@ -957,7 +956,7 @@ mod wav_audio {
 
     impl<F> serde::Deserialize for wav::Audio<F>
         where F: sample::Frame + serde::Deserialize,
-              F::Sample: sample::Duplex<f64> + hound::Sample,
+              F::Sample: sample::Duplex<f64> + sample::Duplex<i32>,
               Box<[F::Sample]>: sample::ToBoxedFrameSlice<F>,
     {
         fn deserialize<D>(deserializer: &mut D) -> Result<Self, D::Error>
@@ -969,7 +968,7 @@ mod wav_audio {
 
             impl<F> serde::de::Visitor for Visitor<F>
                 where F: sample::Frame + serde::Deserialize,
-                      F::Sample: sample::Duplex<f64> + hound::Sample,
+                      F::Sample: sample::Duplex<f64> + sample::Duplex<i32>,
                       Box<[F::Sample]>: sample::ToBoxedFrameSlice<F>,
             {
                 type Value = wav::Audio<F>;