Skip to content

Conversation

@eliovir
Copy link
Contributor

@eliovir eliovir commented Oct 31, 2013

syntax of interval (a, b)

syntax of interval `(a, b)`
@huonw
Copy link
Contributor

huonw commented Oct 31, 2013

Thank you for the contribution, but this is actually correct: [a,b) represents an interval that is closed on the left and open on the right, i.e. it includes the a index but not the b index, so

let v = [0,1,2,3,4];
assert_eq!(v.slice(1,3), [1,2]);

@eliovir
Copy link
Contributor Author

eliovir commented Oct 31, 2013

Thanks for your reply.

I did not understand that notation, so your reply is a good explanation for the doc sentence. Maybe you can add this to the documentation.

Best regards.

@eliovir eliovir closed this Oct 31, 2013
flip1995 pushed a commit to flip1995/rust that referenced this pull request Jan 27, 2023
…ion-pedantic, r=Jarcho

Move `unchecked_duration_subtraction` to pedantic

changelog: [`unchecked_duration_subtraction`]: Move to pedantic

Based on https://rust-lang.zulipchat.com/#narrow/stream/257328-clippy/topic/Meeting.202023-01-10/near/320488860
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.

2 participants