Added MultipartFile extractors.
Moved cfg macro to lib where possible. Changed some features, and made some deps optional
This commit is contained in:
@ -1,9 +1,7 @@
|
||||
#[cfg(feature = "vec")]
|
||||
pub trait Distinct {
|
||||
fn distinct(&mut self);
|
||||
}
|
||||
|
||||
#[cfg(feature = "vec")]
|
||||
impl<T: PartialEq + Clone> Distinct for Vec<T> {
|
||||
fn distinct(&mut self) {
|
||||
*self = self.iter().fold(vec![], |mut acc, x| {
|
||||
@ -15,7 +13,7 @@ impl<T: PartialEq + Clone> Distinct for Vec<T> {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(all(test, feature = "vec"))]
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
|
Reference in New Issue
Block a user