Skip to content

Commit

Permalink
Merge branch 'xMAC94x/update_toolchain' into 'master'
Browse files Browse the repository at this point in the history
update to toolchain `nightly-2024-01-17`

See merge request veloren/airshipper!110
  • Loading branch information
xMAC94x committed Feb 7, 2024
2 parents 857bb30 + d4ab195 commit 1207836
Show file tree
Hide file tree
Showing 13 changed files with 27 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ stages:

variables:
GIT_CLEAN_FLAGS: -f
CACHE_IMAGE_TAG: d74ceb0a
CACHE_IMAGE_TAG: 23a6c908

default:
# https://docs.gitlab.com/ee/ci/pipelines/settings.html#auto-cancel-pending-pipelines
Expand Down
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions client/src/gui/components/changelog_panel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,10 @@ impl ChangelogPanelComponent {

// section done
// save if not empty
if section_name.is_some() && !section_lines.is_empty() {
sections.push((section_name.unwrap(), section_lines));
if let Some(section_name) = section_name
&& !section_lines.is_empty()
{
sections.push((section_name, section_lines));
}
},
// paragraph without section aka note
Expand Down
4 changes: 1 addition & 3 deletions client/src/gui/components/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,5 @@ pub use community_showcase_panel::{
pub use game_panel::{GamePanelComponent, GamePanelMessage};
pub use logo_panel::LogoPanelComponent;
pub use news_panel::{NewsPanelComponent, NewsPanelMessage};
pub use server_browser_panel::{
ServerBrowserEntry, ServerBrowserPanelComponent, ServerBrowserPanelMessage,
};
pub use server_browser_panel::{ServerBrowserPanelComponent, ServerBrowserPanelMessage};
pub use settings_panel::{SettingsPanelComponent, SettingsPanelMessage};
4 changes: 3 additions & 1 deletion client/src/gui/components/server_browser_panel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,9 @@ impl ServerBrowserPanelComponent {
)
.padding(0);

let row_style = if let Some(selected_index) = self.selected_index && selected_index == i {
let row_style = if let Some(selected_index) = self.selected_index
&& selected_index == i
{
ButtonStyle::ServerListEntry(ServerListEntryButtonState::Selected)
} else {
ButtonStyle::ServerListEntry(ServerListEntryButtonState::NotSelected)
Expand Down
15 changes: 10 additions & 5 deletions client/src/gui/rss_feed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ pub trait RssFeedComponent {
},
RssFeedComponentMessage::ImageFetched { result, url } => {
if let Ok(bytes) = result {
if let Some(mut post) = self
if let Some(post) = self
.posts_mut()
.iter_mut()
.filter(|post| post.image_url.is_some())
Expand Down Expand Up @@ -250,8 +250,11 @@ impl RssPost {
.lines()
.take(3)
.filter(|x| !x.contains("[banner]"))
.map(|x| format!("{}\n", x))
.collect::<String>();
.fold(String::new(), |mut output, b| {
use std::fmt::Write;
let _ = writeln!(output, "{b}");
output
});
strip_markdown::strip_markdown(&stripped_html)
},
None => "No description found.".into(),
Expand All @@ -272,10 +275,12 @@ impl From<&rss::Item> for RssPost {
// If the RSS item has an enclosure (attached media), check if it's a jpg or png
// and if it is store the URL against the post for display in the RSS
// feed.
if let Some(enclosure) = &item.enclosure && matches!(enclosure.mime_type.as_str(), "image/jpg" | "image/png") {
if let Some(enclosure) = &item.enclosure
&& matches!(enclosure.mime_type.as_str(), "image/jpg" | "image/png")
{
let mut url = enclosure.url.clone();

// If the image is hosted by the discord CDN, use its ability to provide a
// If the image is hosted by the discord CDN, use its ability to provide a
// resized image to save bandwidth
if url.starts_with("https://media.discordapp.net") {
url = format!("{}?width=320&height=240", url);
Expand Down
2 changes: 1 addition & 1 deletion client/src/io/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ pub fn log_path_file() -> (&'static Path, &'static str) {
pub fn unzip(profile: &Profile) -> Result<()> {
tracing::info!("Unzipping to {:?}", profile.directory());
let mut zip_file =
std::fs::File::open(&profile.directory().join(consts::DOWNLOAD_FILE))?;
std::fs::File::open(profile.directory().join(consts::DOWNLOAD_FILE))?;

let mut archive = zip::ZipArchive::new(&mut zip_file)?;

Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain
Original file line number Diff line number Diff line change
@@ -1 +1 @@
nightly-2023-04-20
nightly-2024-01-17
2 changes: 0 additions & 2 deletions server/src/fairings/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
pub mod db;

pub use db::*;
1 change: 1 addition & 0 deletions server/src/routes/api.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![allow(unused_imports)]
use crate::{
config::{Platform, API_VERSION},
metrics::Metrics,
Expand Down
1 change: 1 addition & 0 deletions server/src/routes/gitlab.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![allow(unused_imports)]
use crate::{
guards::{GitlabEvent, GitlabSecret},
metrics::Metrics,
Expand Down
1 change: 1 addition & 0 deletions server/src/routes/metrics.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![allow(unused_imports)]
use crate::{metrics::Metrics, Result};
use rocket::*;
use std::sync::Arc;
Expand Down
1 change: 1 addition & 0 deletions server/src/routes/user.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![allow(unused_imports)]
use rocket::*;

#[get("/")]
Expand Down

0 comments on commit 1207836

Please sign in to comment.