mirror of
https://github.com/joshuadavidthomas/django-language-server.git
synced 2025-07-09 21:54:59 +00:00
fmt
This commit is contained in:
parent
f4fc4f85ac
commit
3d77cf9991
2 changed files with 4 additions and 2 deletions
|
@ -107,7 +107,8 @@ impl Token {
|
|||
}
|
||||
|
||||
pub fn start(&self) -> Option<u32> {
|
||||
self.start.map(|s| u32::try_from(s).expect("Start position should fit in u32"))
|
||||
self.start
|
||||
.map(|s| u32::try_from(s).expect("Start position should fit in u32"))
|
||||
}
|
||||
|
||||
pub fn length(&self) -> u32 {
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
use std::fmt::Write;
|
||||
|
||||
use anyhow::Result;
|
||||
use clap::Parser;
|
||||
|
||||
|
@ -33,7 +35,6 @@ pub fn run(args: Vec<String>) -> Result<()> {
|
|||
Err(e) => {
|
||||
let mut msg = e.to_string();
|
||||
if let Some(source) = e.source() {
|
||||
use std::fmt::Write;
|
||||
let _ = write!(msg, ", caused by {source}");
|
||||
}
|
||||
Exit::error().with_message(msg).process_exit()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue