Rename last to last_opt, last_unsafe to last
As per discussion on IRC. I am about to file an RFC for further discussion about the more general issue of whether to enforce invariants through types, typestate, or dynamic checks, but for now, removing the misleading name "last_unsafe".
This commit is contained in:
parent
8047c0cd68
commit
0c5fdc8745
13 changed files with 30 additions and 31 deletions
|
|
@ -144,7 +144,7 @@ fn find_library_crate(sess: session::session, ident: ast::ident,
|
|||
let crate_name =
|
||||
{
|
||||
let name_items = attr::find_meta_items_by_name(metas, "name");
|
||||
alt vec::last(name_items) {
|
||||
alt vec::last_opt(name_items) {
|
||||
some(i) {
|
||||
alt attr::get_meta_item_value_str(i) {
|
||||
some(n) { n }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue