Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Place allow unused imports under cfg
  • Loading branch information
xiangzhai committed Apr 23, 2023
commit ee3e23a0d4c16ce4b7628c72839483a4c33de058
2 changes: 1 addition & 1 deletion stdlib/src/mmap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ mod mmap {
MADV_MERGEABLE, MADV_NOHUGEPAGE, MADV_REMOVE, MADV_UNMERGEABLE,
};

#[allow(unused_imports)]
#[cfg(any(
target_os = "android",
all(
Expand All @@ -132,6 +131,7 @@ mod mmap {
)
)
))]
#[allow(unused_imports)]
Copy link
Copy Markdown
Member

@youknowone youknowone Apr 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#[allow(unused_imports)]
#[pyattr]

The value has to be used by pyattr to be exposed to python side

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I got :)

use libc::MADV_SOFT_OFFLINE;

#[cfg(all(target_os = "linux", target_arch = "x86_64", target_env = "gnu"))]
Expand Down