Skip to content

Commit 4536d3b

Browse files
committed
Rename new_with to with_settings
1 parent ef4e868 commit 4536d3b

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/chunk.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ impl Chunk {
5050
}
5151

5252
/// Create a new chunk with the given write settings.
53-
pub fn new_with(write_settings: WriteSettings) -> Self {
53+
pub fn with_settings(write_settings: WriteSettings) -> Self {
5454
let mut chunk = Self::new();
5555
chunk.write_settings = write_settings;
5656

src/content.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ impl Content {
1919
}
2020

2121
/// Create a new content stream with the given write settings.
22-
pub fn new_with(write_settings: WriteSettings) -> Self {
22+
pub fn with_settings(write_settings: WriteSettings) -> Self {
2323
let mut content = Self::new();
2424
content.write_settings = write_settings;
2525

@@ -1751,7 +1751,7 @@ mod tests {
17511751

17521752
#[test]
17531753
fn test_content_array_no_pretty() {
1754-
let mut content = Content::new_with(WriteSettings { pretty: false });
1754+
let mut content = Content::with_settings(WriteSettings { pretty: false });
17551755

17561756
content.set_font(Name(b"F1"), 12.0);
17571757
content.set_font(Name(b"F2"), 15.0);
@@ -1775,7 +1775,7 @@ mod tests {
17751775

17761776
#[test]
17771777
fn test_content_dict_no_pretty() {
1778-
let mut content = Content::new_with(WriteSettings { pretty: false });
1778+
let mut content = Content::with_settings(WriteSettings { pretty: false });
17791779

17801780
let mut mc = content.begin_marked_content_with_properties(Name(b"Test"));
17811781
let mut properties = mc.properties();

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ impl Pdf {
230230
}
231231

232232
/// Create a new PDF with the given write settings.
233-
pub fn new_with(write_settings: WriteSettings) -> Self {
233+
pub fn with_settings(write_settings: WriteSettings) -> Self {
234234
let mut pdf = Self::new();
235235
pdf.write_settings = write_settings;
236236

@@ -426,7 +426,7 @@ mod tests {
426426
where
427427
F: FnOnce(&mut Pdf),
428428
{
429-
let mut w = Pdf::new_with(write_settings);
429+
let mut w = Pdf::with_settings(write_settings);
430430
let start = w.len();
431431
f(&mut w);
432432
let end = w.len();

0 commit comments

Comments
 (0)