Remove inferred 'static lifetime on const, Rust 1.17+

No longer needed since it is inferred automatically:
https://rust-lang-nursery.github.io/edition-guide/rust-2018/ownership-and-lifetimes/simpler-lifetimes-in-static-and-const.html
This commit is contained in:
ice_iix 2018-11-04 13:37:57 -08:00
parent 103a58f92a
commit 2af7307d8b
4 changed files with 12 additions and 12 deletions

View File

@ -25,7 +25,7 @@ use crate::ui;
use crate::render; use crate::render;
use crate::format::{Component, TextComponent, Color}; use crate::format::{Component, TextComponent, Color};
const FILTERED_CRATES: &'static [&'static str] = &[ const FILTERED_CRATES: &[&str] = &[
//"reqwest", // TODO: needed? //"reqwest", // TODO: needed?
"mime", "mime",
]; ];

View File

@ -698,14 +698,14 @@ impl Factory {
} }
} }
const FACE_ROTATION: &'static [Direction] = &[ const FACE_ROTATION: &[Direction] = &[
Direction::North, Direction::North,
Direction::East, Direction::East,
Direction::South, Direction::South,
Direction::West, Direction::West,
]; ];
const FACE_ROTATION_X: &'static [Direction] = &[ const FACE_ROTATION_X: &[Direction] = &[
Direction::North, Direction::North,
Direction::Down, Direction::Down,
Direction::South, Direction::South,
@ -989,7 +989,7 @@ fn calculate_light(snapshot: &world::Snapshot, orig_x: i32, orig_y: i32, orig_z:
pub const PRECOMPUTED_VERTS: [&'static [BlockVertex; 4]; 6] = [ pub const PRECOMPUTED_VERTS: [&[BlockVertex; 4]; 6] = [
&[ // Up &[ // Up
BlockVertex::base(0.0, 1.0, 0.0, 0, 0), BlockVertex::base(0.0, 1.0, 0.0, 0, 0),
BlockVertex::base(1.0, 1.0, 0.0, 1, 0), BlockVertex::base(1.0, 1.0, 0.0, 1, 0),

View File

@ -23,10 +23,10 @@ pub struct Profile {
pub access_token: String, pub access_token: String,
} }
const JOIN_URL: &'static str = "https://sessionserver.mojang.com/session/minecraft/join"; const JOIN_URL: &str = "https://sessionserver.mojang.com/session/minecraft/join";
const LOGIN_URL: &'static str = "https://authserver.mojang.com/authenticate"; const LOGIN_URL: &str = "https://authserver.mojang.com/authenticate";
const REFRESH_URL: &'static str = "https://authserver.mojang.com/refresh"; const REFRESH_URL: &str = "https://authserver.mojang.com/refresh";
const VALIDATE_URL: &'static str = "https://authserver.mojang.com/validate"; const VALIDATE_URL: &str = "https://authserver.mojang.com/validate";
impl Profile { impl Profile {
pub fn login(username: &str, password: &str, token: &str) -> Result<Profile, super::Error> { pub fn login(username: &str, password: &str, token: &str) -> Result<Profile, super::Error> {

View File

@ -30,10 +30,10 @@ use zip;
use crate::types::hash::FNVHash; use crate::types::hash::FNVHash;
use crate::ui; use crate::ui;
const RESOURCES_VERSION: &'static str = "1.11"; const RESOURCES_VERSION: &str = "1.11";
const VANILLA_CLIENT_URL: &'static str = "https://launcher.mojang.com/mc/game/1.11/client/780e46b3a96091a7f42c028c615af45974629072/client.jar"; const VANILLA_CLIENT_URL: &str = "https://launcher.mojang.com/mc/game/1.11/client/780e46b3a96091a7f42c028c615af45974629072/client.jar";
const ASSET_VERSION: &'static str = "1.11"; const ASSET_VERSION: &str = "1.11";
const ASSET_INDEX_URL: &'static str = "https://launchermeta.mojang.com/mc/assets/1.11/e02b8fba4390e173057895c56ecc91e3ce3bbd40/1.11.json"; const ASSET_INDEX_URL: &str = "https://launchermeta.mojang.com/mc/assets/1.11/e02b8fba4390e173057895c56ecc91e3ce3bbd40/1.11.json";
pub trait Pack: Sync + Send { pub trait Pack: Sync + Send {
fn open(&self, name: &str) -> Option<Box<io::Read>>; fn open(&self, name: &str) -> Option<Box<io::Read>>;