mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-03 18:28:24 +00:00
Upgrade to Rust 1.82 (#13816)
This commit is contained in:
parent
bd33b4972d
commit
2ff36530c3
11 changed files with 58 additions and 50 deletions
|
@ -6,6 +6,8 @@ use lsp_types::InitializeParams;
|
|||
use lsp_types::WorkspaceFolder;
|
||||
use std::num::NonZeroUsize;
|
||||
use std::ops::Deref;
|
||||
// The new PanicInfoHook name requires MSRV >= 1.82
|
||||
#[allow(deprecated)]
|
||||
use std::panic::PanicInfo;
|
||||
use std::str::FromStr;
|
||||
use thiserror::Error;
|
||||
|
@ -125,6 +127,8 @@ impl Server {
|
|||
}
|
||||
|
||||
pub fn run(self) -> crate::Result<()> {
|
||||
// The new PanicInfoHook name requires MSRV >= 1.82
|
||||
#[allow(deprecated)]
|
||||
type PanicHook = Box<dyn Fn(&PanicInfo<'_>) + 'static + Sync + Send>;
|
||||
struct RestorePanicHook {
|
||||
hook: Option<PanicHook>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue