Skip to content

Commit

Permalink
- add enables feature in CI
Browse files Browse the repository at this point in the history
- fix warnings
  • Loading branch information
cksac committed Nov 4, 2021
1 parent 6cd35c4 commit 7e4a897
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ jobs:
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
run: cargo test --all-features --verbose
21 changes: 11 additions & 10 deletions fake/examples/derive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,42 +7,43 @@ use fake::uuid::UUIDv4;


#[derive(Debug, Dummy)]
enum OrderStatus {
pub enum OrderStatus {
Completed,
Cancelled,
}

#[derive(Debug, Dummy)]
pub struct Order {
#[dummy(faker = "1000..")]
order_id: usize,
pub order_id: usize,

#[dummy(faker = "Name()")]
customer: String,
pub customer: String,

#[dummy(faker = "(Faker, 3..5)")]
items: Vec<Item>,
pub items: Vec<Item>,

#[dummy(faker = "Boolean(70)")]
paid: bool,
pub paid: bool,

status: OrderStatus,
pub status: OrderStatus,

#[dummy(faker = "UUIDv4")]
uuid: uuid::Uuid,
pub uuid: uuid::Uuid,
}

#[derive(Debug, Dummy)]
pub struct Item {
#[dummy(faker = "1..100")]
product_id: usize,
pub product_id: usize,

qty: u8,
pub qty: u8,

#[dummy(faker = "CompanyName()")]
company: String,
pub company: String,
}

#[allow(dead_code)]
#[derive(Debug, Dummy)]
enum Message {
Quit,
Expand Down

0 comments on commit 7e4a897

Please sign in to comment.