Skip to content

Commit

Permalink
Merge pull request #910 from Eijebong/remove_more_fixme
Browse files Browse the repository at this point in the history
Remove some FIXMEs now that rust-lang/rust#31776 has been fixed
  • Loading branch information
killercup authored May 15, 2017
2 parents 925ca0e + 934f4dc commit 1db8c79
Showing 1 changed file with 10 additions and 18 deletions.
28 changes: 10 additions & 18 deletions diesel/src/macros/insertable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -273,17 +273,11 @@ mod tests {

macro_rules! test_struct_definition {
($test_name:ident, $($struct_def:tt)*) => {
// FIXME: This module is to work around rust-lang/rust#31776
// Remove the module and move the struct definition into the test function once
// 1.9 is released. The `use` statements can be removed.
//
// The indentation is intentionally weird to avoid git churn when this is fixed.
mod $test_name {
use super::{users, connection};
use prelude::*;
__diesel_parse_as_item!($($struct_def)*);
#[test]
fn $test_name() {
use prelude::*;
__diesel_parse_as_item!($($struct_def)*);

impl_Insertable! {
(users)
$($struct_def)*
Expand All @@ -298,7 +292,6 @@ mod tests {
let expected = vec![("Sean".to_string(), Some("Green".to_string()))];
assert_eq!(Ok(expected), saved);
}
}
}
}

Expand Down Expand Up @@ -472,16 +465,15 @@ mod tests {
conn
}

// FIXME: This can be moved into the function once `pub` is allowed
table! {
posts {
id -> Serial,
tags -> Array<Text>,
}
}

#[test]
fn insertable_with_slice_of_borrowed() {
table! {
posts {
id -> Serial,
tags -> Array<Text>,
}
}

struct NewPost<'a> { tags: &'a [&'a str], }
impl_Insertable! { (posts) struct NewPost<'a> { tags: &'a [&'a str], } }

Expand Down

0 comments on commit 1db8c79

Please sign in to comment.