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:
parent
103a58f92a
commit
2af7307d8b
|
@ -25,7 +25,7 @@ use crate::ui;
|
|||
use crate::render;
|
||||
use crate::format::{Component, TextComponent, Color};
|
||||
|
||||
const FILTERED_CRATES: &'static [&'static str] = &[
|
||||
const FILTERED_CRATES: &[&str] = &[
|
||||
//"reqwest", // TODO: needed?
|
||||
"mime",
|
||||
];
|
||||
|
|
|
@ -698,14 +698,14 @@ impl Factory {
|
|||
}
|
||||
}
|
||||
|
||||
const FACE_ROTATION: &'static [Direction] = &[
|
||||
const FACE_ROTATION: &[Direction] = &[
|
||||
Direction::North,
|
||||
Direction::East,
|
||||
Direction::South,
|
||||
Direction::West,
|
||||
];
|
||||
|
||||
const FACE_ROTATION_X: &'static [Direction] = &[
|
||||
const FACE_ROTATION_X: &[Direction] = &[
|
||||
Direction::North,
|
||||
Direction::Down,
|
||||
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
|
||||
BlockVertex::base(0.0, 1.0, 0.0, 0, 0),
|
||||
BlockVertex::base(1.0, 1.0, 0.0, 1, 0),
|
||||
|
|
|
@ -23,10 +23,10 @@ pub struct Profile {
|
|||
pub access_token: String,
|
||||
}
|
||||
|
||||
const JOIN_URL: &'static str = "https://sessionserver.mojang.com/session/minecraft/join";
|
||||
const LOGIN_URL: &'static str = "https://authserver.mojang.com/authenticate";
|
||||
const REFRESH_URL: &'static str = "https://authserver.mojang.com/refresh";
|
||||
const VALIDATE_URL: &'static str = "https://authserver.mojang.com/validate";
|
||||
const JOIN_URL: &str = "https://sessionserver.mojang.com/session/minecraft/join";
|
||||
const LOGIN_URL: &str = "https://authserver.mojang.com/authenticate";
|
||||
const REFRESH_URL: &str = "https://authserver.mojang.com/refresh";
|
||||
const VALIDATE_URL: &str = "https://authserver.mojang.com/validate";
|
||||
|
||||
impl Profile {
|
||||
pub fn login(username: &str, password: &str, token: &str) -> Result<Profile, super::Error> {
|
||||
|
|
|
@ -30,10 +30,10 @@ use zip;
|
|||
use crate::types::hash::FNVHash;
|
||||
use crate::ui;
|
||||
|
||||
const RESOURCES_VERSION: &'static str = "1.11";
|
||||
const VANILLA_CLIENT_URL: &'static str = "https://launcher.mojang.com/mc/game/1.11/client/780e46b3a96091a7f42c028c615af45974629072/client.jar";
|
||||
const ASSET_VERSION: &'static str = "1.11";
|
||||
const ASSET_INDEX_URL: &'static str = "https://launchermeta.mojang.com/mc/assets/1.11/e02b8fba4390e173057895c56ecc91e3ce3bbd40/1.11.json";
|
||||
const RESOURCES_VERSION: &str = "1.11";
|
||||
const VANILLA_CLIENT_URL: &str = "https://launcher.mojang.com/mc/game/1.11/client/780e46b3a96091a7f42c028c615af45974629072/client.jar";
|
||||
const ASSET_VERSION: &str = "1.11";
|
||||
const ASSET_INDEX_URL: &str = "https://launchermeta.mojang.com/mc/assets/1.11/e02b8fba4390e173057895c56ecc91e3ce3bbd40/1.11.json";
|
||||
|
||||
pub trait Pack: Sync + Send {
|
||||
fn open(&self, name: &str) -> Option<Box<io::Read>>;
|
||||
|
|
Loading…
Reference in New Issue