Skip to content
This repository was archived by the owner on Apr 13, 2022. It is now read-only.

Conversation

@niklasad1
Copy link
Contributor

No description provided.

Copy link

@ordian ordian left a comment

Choose a reason for hiding this comment

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

I've noticed that README is outdated, could you fix the name and the link to docs as well?

/// Macro for calling `c-style functions` and wrapping the return status in a `Result`
/// If the function return `-1` it will return `Err<$err:expr>` otherwise `Ok(int)`
// FIXME: this is not platform independent: `https://github.com/paritytech/parity-daemonize/issues/14`
macro_rules! map_err {
Copy link

Choose a reason for hiding this comment

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

Why do we expose this macro in the first place, can we move to unix submodule/or add #[doc(hidden)]?

Copy link
Contributor Author

@niklasad1 niklasad1 Feb 17, 2019

Choose a reason for hiding this comment

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

I don't know and I think we shouldn't export it because it is only used internally but I would prefer keep it out of this PR.
I can mark it as #[doc(hidden)] ok?

Also I think we could re-write the macro to get full failure case, such as Rust does it: https://github.com/rust-lang/rust/blob/master/src/libstd/sys/unix/mod.rs#L129-#L135

Copy link

Choose a reason for hiding this comment

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

I can mark it as #[doc(hidden)] ok?

yep

Also I think we could re-write the macro to get full failure case, such as Rust does it: https://github.com/rust-lang/rust/blob/master/src/libstd/sys/unix/mod.rs#L129-#L135

yeah, also it doesn't need to be a macro anymore, which would eliminate the need for #[doc(hidden)]

/// Macro for calling `c-style functions` and wrapping the return status in a `Result`
/// If the function return `-1` it will return `Err<$err:expr>` otherwise `Ok(int)`
// FIXME: this is not platform independent: `https://github.com/paritytech/parity-daemonize/issues/14`
macro_rules! map_err {
Copy link

Choose a reason for hiding this comment

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

I can mark it as #[doc(hidden)] ok?

yep

Also I think we could re-write the macro to get full failure case, such as Rust does it: https://github.com/rust-lang/rust/blob/master/src/libstd/sys/unix/mod.rs#L129-#L135

yeah, also it doesn't need to be a macro anymore, which would eliminate the need for #[doc(hidden)]

ordian and others added 3 commits February 18, 2019 10:01
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants