Skip to content

Commit

Permalink
complete rename
Browse files Browse the repository at this point in the history
  • Loading branch information
s3bk committed Jan 18, 2024
1 parent b4599ae commit 7d4bb06
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions pdf/src/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ use crate::primitive::Primitive;
#[derive(Default)]
pub struct PageBuilder {
pub ops: Vec<Op>,
pub media_box: Option<Rect>,
pub crop_box: Option<Rect>,
pub trim_box: Option<Rect>,
pub media_box: Option<ViewRect>,

Check warning on line 26 in pdf/src/build.rs

View workflow job for this annotation

GitHub Actions / tests

`ViewRect` is ambiguous

Check warning on line 26 in pdf/src/build.rs

View workflow job for this annotation

GitHub Actions / clippy

use of deprecated type alias `object::types::ViewRect`

warning: use of deprecated type alias `object::types::ViewRect` --> pdf/src/build.rs:26:27 | 26 | pub media_box: Option<ViewRect>, | ^^^^^^^^ | = note: `#[warn(deprecated)]` on by default

Check warning on line 26 in pdf/src/build.rs

View workflow job for this annotation

GitHub Actions / clippy

`ViewRect` is ambiguous

warning: `ViewRect` is ambiguous --> pdf/src/build.rs:26:27 | 26 | pub media_box: Option<ViewRect>, | ^^^^^^^^ ambiguous name | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #114095 <https://github.com/rust-lang/rust/issues/114095> = note: ambiguous because of multiple glob imports of a name in the same module note: `ViewRect` could refer to the type alias imported here --> pdf/src/build.rs:16:5 | 16 | use crate::object::*; | ^^^^^^^^^^^^^^^^ = help: consider adding an explicit import of `ViewRect` to disambiguate note: `ViewRect` could also refer to the struct imported here --> pdf/src/build.rs:17:5 | 17 | use crate::content::*; | ^^^^^^^^^^^^^^^^^ = help: consider adding an explicit import of `ViewRect` to disambiguate = note: `#[warn(ambiguous_glob_imports)]` on by default
pub crop_box: Option<ViewRect>,

Check warning on line 27 in pdf/src/build.rs

View workflow job for this annotation

GitHub Actions / clippy

use of deprecated type alias `object::types::ViewRect`

warning: use of deprecated type alias `object::types::ViewRect` --> pdf/src/build.rs:27:26 | 27 | pub crop_box: Option<ViewRect>, | ^^^^^^^^

Check warning on line 27 in pdf/src/build.rs

View workflow job for this annotation

GitHub Actions / clippy

`ViewRect` is ambiguous

warning: `ViewRect` is ambiguous --> pdf/src/build.rs:27:26 | 27 | pub crop_box: Option<ViewRect>, | ^^^^^^^^ ambiguous name | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #114095 <https://github.com/rust-lang/rust/issues/114095> = note: ambiguous because of multiple glob imports of a name in the same module note: `ViewRect` could refer to the type alias imported here --> pdf/src/build.rs:16:5 | 16 | use crate::object::*; | ^^^^^^^^^^^^^^^^ = help: consider adding an explicit import of `ViewRect` to disambiguate note: `ViewRect` could also refer to the struct imported here --> pdf/src/build.rs:17:5 | 17 | use crate::content::*; | ^^^^^^^^^^^^^^^^^ = help: consider adding an explicit import of `ViewRect` to disambiguate
pub trim_box: Option<ViewRect>,

Check warning on line 28 in pdf/src/build.rs

View workflow job for this annotation

GitHub Actions / clippy

use of deprecated type alias `object::types::ViewRect`

warning: use of deprecated type alias `object::types::ViewRect` --> pdf/src/build.rs:28:26 | 28 | pub trim_box: Option<ViewRect>, | ^^^^^^^^

Check warning on line 28 in pdf/src/build.rs

View workflow job for this annotation

GitHub Actions / clippy

`ViewRect` is ambiguous

warning: `ViewRect` is ambiguous --> pdf/src/build.rs:28:26 | 28 | pub trim_box: Option<ViewRect>, | ^^^^^^^^ ambiguous name | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #114095 <https://github.com/rust-lang/rust/issues/114095> = note: ambiguous because of multiple glob imports of a name in the same module note: `ViewRect` could refer to the type alias imported here --> pdf/src/build.rs:16:5 | 16 | use crate::object::*; | ^^^^^^^^^^^^^^^^ = help: consider adding an explicit import of `ViewRect` to disambiguate note: `ViewRect` could also refer to the struct imported here --> pdf/src/build.rs:17:5 | 17 | use crate::content::*; | ^^^^^^^^^^^^^^^^^ = help: consider adding an explicit import of `ViewRect` to disambiguate
pub resources: Resources,
pub rotate: i32,
pub metadata: Option<Primitive>,
Expand Down Expand Up @@ -82,7 +82,7 @@ impl PageBuilder {
})
}
pub fn size(&mut self, width: f32, height: f32) {
self.media_box = Some(Rect {
self.media_box = Some(ViewRect {

Check warning on line 85 in pdf/src/build.rs

View workflow job for this annotation

GitHub Actions / clippy

use of deprecated type alias `object::types::ViewRect`

warning: use of deprecated type alias `object::types::ViewRect` --> pdf/src/build.rs:85:31 | 85 | self.media_box = Some(ViewRect { | ^^^^^^^^

Check warning on line 85 in pdf/src/build.rs

View workflow job for this annotation

GitHub Actions / clippy

`ViewRect` is ambiguous

warning: `ViewRect` is ambiguous --> pdf/src/build.rs:85:31 | 85 | self.media_box = Some(ViewRect { | ^^^^^^^^ ambiguous name | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #114095 <https://github.com/rust-lang/rust/issues/114095> = note: ambiguous because of multiple glob imports of a name in the same module note: `ViewRect` could refer to the type alias imported here --> pdf/src/build.rs:16:5 | 16 | use crate::object::*; | ^^^^^^^^^^^^^^^^ = help: consider adding an explicit import of `ViewRect` to disambiguate note: `ViewRect` could also refer to the struct imported here --> pdf/src/build.rs:17:5 | 17 | use crate::content::*; | ^^^^^^^^^^^^^^^^^ = help: consider adding an explicit import of `ViewRect` to disambiguate
top: 0.,
left: 0.,
bottom: height,
Expand Down
2 changes: 1 addition & 1 deletion pdf/src/object/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1550,7 +1550,7 @@ pub struct Rectangle {
pub top: f32,
}
#[deprecated]
pub type Rect = Rectangle;
pub type ViewRect = Rectangle;

impl Object for Rectangle {
fn from_primitive(p: Primitive, r: &impl Resolve) -> Result<Self> {
Expand Down

0 comments on commit 7d4bb06

Please sign in to comment.