Skip to content

Commit

Permalink
fix rustfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
mammothbane committed Jul 31, 2024
1 parent eb488cc commit cb889cd
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 20 deletions.
2 changes: 1 addition & 1 deletion core/src/coproduct.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1247,8 +1247,8 @@ mod tests {
use super::Coproduct::*;
use super::*;

use std::string::{String, ToString};
use std::format;
use std::string::{String, ToString};

#[test]
fn test_coproduct_inject() {
Expand Down
4 changes: 2 additions & 2 deletions core/src/hlist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@
use crate::indices::{Here, Suffixed, There};
use crate::traits::{Func, IntoReverse, Poly, ToMut, ToRef};
#[cfg(feature = "serde")]
use serde::{Deserialize, Serialize};
#[cfg(feature = "alloc")]
use alloc::vec::Vec;
#[cfg(feature = "serde")]
use serde::{Deserialize, Serialize};

use core::ops::Add;

Expand Down
5 changes: 2 additions & 3 deletions core/src/labelled.rs
Original file line number Diff line number Diff line change
Expand Up @@ -737,9 +737,9 @@ impl<Key, SourceValue> Transmogrifier<SourceValue, IdentityTransMog> for Field<K
mod _alloc {
use super::MappingIndicesWrapper;
use super::{Field, Transmogrifier};
use alloc::boxed::Box;
use alloc::collections::{LinkedList, VecDeque};
use alloc::vec::Vec;
use alloc::boxed::Box;

macro_rules! transmogrify_seq {
($container:ident) => {
Expand Down Expand Up @@ -917,8 +917,7 @@ mod tests {
use super::chars::*;
use super::*;
use alloc::collections::{LinkedList, VecDeque};
use alloc::{boxed::Box, vec::Vec, format, vec};

use alloc::{boxed::Box, format, vec, vec::Vec};

// Set up some aliases
#[allow(non_camel_case_types)]
Expand Down
1 change: 0 additions & 1 deletion core/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#![no_std]

#![doc(html_playground_url = "https://play.rust-lang.org/")]
//! Frunk Core
//!
Expand Down
1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#![no_std]

#![doc(html_playground_url = "https://play.rust-lang.org/")]
//! Frunk: generic functional programming toolbelt for Rust
//!
Expand Down
2 changes: 1 addition & 1 deletion src/monoid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ mod tests {
use super::*;

#[cfg(feature = "alloc")]
use alloc::{vec, borrow::ToOwned};
use alloc::{borrow::ToOwned, vec};

#[test]
fn test_combine_n() {
Expand Down
20 changes: 11 additions & 9 deletions src/semigroup.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
//! Module for holding the Semigroup typeclass definition and typeclass instances
//!
//! You can, for example, combine tuples.
#![cfg_attr(feature = "alloc", doc = r#"
#![cfg_attr(
feature = "alloc",
doc = r#"
# Examples
```
Expand All @@ -27,18 +29,18 @@ assert_eq!(h1.combine(&h2), h3)
```"#
)]

use frunk_core::hlist::*;
#[cfg(feature = "alloc")]
use alloc::{boxed::Box, string::String, vec::Vec};
use core::cell::*;
use core::cmp::Ordering;
#[cfg(feature = "alloc")]
use core::hash::Hash;
use core::ops::{BitAnd, BitOr, Deref};
use frunk_core::hlist::*;
#[cfg(feature = "std")]
use std::collections::hash_map::Entry;
#[cfg(feature = "std")]
use std::collections::{HashMap, HashSet};
#[cfg(feature = "alloc")]
use core::hash::Hash;
#[cfg(feature = "alloc")]
use alloc::{string::String, vec::Vec, boxed::Box};
use core::ops::{BitAnd, BitOr, Deref};

/// Wrapper type for types that are ordered and can have a Max combination
#[derive(PartialEq, Debug, Eq, Clone, Copy, PartialOrd, Ord, Hash)]
Expand Down Expand Up @@ -362,9 +364,9 @@ tuple_impls! {
mod tests {
use super::*;
#[cfg(feature = "alloc")]
use frunk_core::hlist;
#[cfg(feature = "alloc")]
use alloc::{borrow::ToOwned, vec};
#[cfg(feature = "alloc")]
use frunk_core::hlist;

macro_rules! semigroup_tests {
($($name:ident, $comb: expr => $expected: expr, $tr:ty)+) => {
Expand Down
4 changes: 2 additions & 2 deletions src/validated.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
use super::hlist::*;

use core::ops::Add;
use alloc::{vec, vec::Vec};
use core::ops::Add;

/// A Validated is either an Ok holding an HList or an Err, holding a vector
/// of collected errors.
Expand Down Expand Up @@ -245,8 +245,8 @@ where
#[cfg(test)]
mod tests {
use super::*;
use frunk_core::{hlist, hlist_pat};
use alloc::{borrow::ToOwned, string::String};
use frunk_core::{hlist, hlist_pat};

#[test]
fn test_adding_ok_results() {
Expand Down

0 comments on commit cb889cd

Please sign in to comment.