Skip to content

Conversation

@ahomescu
Copy link
Contributor

No description provided.

@ahomescu ahomescu added the enhancement New feature or request label Mar 25, 2020
@ahomescu ahomescu self-assigned this Mar 25, 2020
ahomescu added 22 commits April 29, 2020 18:31
@ahomescu ahomescu changed the base branch from feature/cow_dtd to master May 1, 2020 00:07
Copy link
Contributor

@TheDan64 TheDan64 left a comment

Choose a reason for hiding this comment

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

Looks good overall, just have a few thoughts

use std::rc::{Rc, Weak};
use std::slice;

type Ptr<T> = Option<Rc<T>>;
Copy link
Contributor

Choose a reason for hiding this comment

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

If I hadn't seen this alias, it wouldn't have been obvious what Ptr<T> is. OptRc<T> would be more obvious, but at that point it's not far off from Option<Rc<T>>. Is the full type that verbose that it warrants an alias?

pub notation: Cell<*const XML_Char>,
pub open: Cell<XML_Bool>,
pub is_param: Cell<XML_Bool>,
pub is_internal: Cell<XML_Bool>,
Copy link
Contributor

Choose a reason for hiding this comment

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

I know that this simplifies a lot, but I keep wondering if it's becoming an anti-pattern if we have to use it absolutely everywhere

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants