Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port multibyte-string-p to rust #211

Merged
merged 3 commits into from Jun 20, 2017

Conversation

shanavas786
Copy link
Collaborator

No description provided.

#[lisp_fn]
fn multibyte_string_p(object: LispObject) -> LispObject {
LispObject::from_bool(
object.is_string() && object.as_string_or_error().is_multibyte(),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Better: object.as_string().map_or(false, |s| s.is_multibyte())

@shanavas786
Copy link
Collaborator Author

@birkenfeld Thanks, updated

Copy link
Collaborator

@Wilfred Wilfred 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 to me! :)

@Wilfred Wilfred merged commit b2e558e into remacs:master Jun 20, 2017
@Wilfred
Copy link
Collaborator

Wilfred commented Jun 20, 2017

Thanks.

@shanavas786 shanavas786 deleted the multibyte-string-p branch July 16, 2017 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants