Skip to content

Commit d18054a

Browse files
committed
fix docs
1 parent 0f90200 commit d18054a

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,6 @@ jobs:
3939
cargo rustdoc -- -Z unstable-options $(cargo metadata --format-version 1 | jq --raw-output '.packages | map("--extern-html-root-url=\(.name)=https://docs.rs/\(.name)/\(.version)") | join(" ")')
4040
- uses: actions/upload-pages-artifact@v1
4141
with:
42-
path: 'target/docs'
42+
path: 'target/doc'
4343
- id: deployment
4444
uses: actions/deploy-pages@v1

tests/test.rs

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,21 @@
1-
use std::fmt::{Alignment, Display};
1+
use std::fmt::Display;
22

33
use derive_more::Display;
44
use proptest::option;
55
use proptest::prelude::*;
66
use proptest_derive::Arbitrary;
77

8+
#[derive(Debug, Arbitrary, Display, Clone)]
9+
#[allow(non_camel_case_types)]
10+
enum Alignment {
11+
#[display(fmt = "<")]
12+
Left,
13+
#[display(fmt = "^")]
14+
Center,
15+
#[display(fmt = ">")]
16+
Right,
17+
}
18+
819
#[derive(Debug, Default, Arbitrary, Display, Clone)]
920
#[allow(non_camel_case_types)]
1021
enum Trait {
@@ -66,7 +77,10 @@ impl Display for FormatArgument {
6677
precision,
6778
trait_,
6879
} = self;
69-
let alignment = "";
80+
let alignment = alignment
81+
.as_ref()
82+
.map(|(fill, alignment)| format!("{}{alignment}", fill.unwrap_or_default()))
83+
.unwrap_or_default();
7084
let hash = if *hash { "#" } else { "" };
7185
let zero = if *zero { "0" } else { "" };
7286
let width = width.map(|w| w.to_string()).unwrap_or_default();

0 commit comments

Comments
 (0)