1
- use std:: fmt:: Display ;
1
+ use std:: fmt;
2
2
3
3
use crate :: protocol:: {
4
4
outbound_message:: compile_response:: CompileFailure , ProtocolError , SourceSpan ,
@@ -17,7 +17,7 @@ pub struct Exception {
17
17
sass_message : Option < String > ,
18
18
sass_stack : Option < String > ,
19
19
span : Option < SourceSpan > ,
20
- source : Option < Box < dyn std:: error:: Error + ' static > > ,
20
+ source : Option < Box < dyn std:: error:: Error + Send + Sync + ' static > > ,
21
21
}
22
22
23
23
impl Exception {
@@ -48,10 +48,10 @@ impl Exception {
48
48
49
49
impl std:: error:: Error for Exception { }
50
50
51
- impl Display for Exception {
51
+ impl fmt :: Display for Exception {
52
52
/// More information:
53
53
/// - [Sass documentation](https://sass-lang.com/documentation/js-api/classes/Exception#toString)
54
- fn fmt ( & self , f : & mut std :: fmt:: Formatter < ' _ > ) -> std :: fmt:: Result {
54
+ fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
55
55
write ! ( f, "{}" , self . message)
56
56
}
57
57
}
@@ -89,7 +89,7 @@ impl Exception {
89
89
/// Sets the source error of the exception.
90
90
pub fn set_source (
91
91
mut self ,
92
- source : impl std:: error:: Error + ' static ,
92
+ source : impl std:: error:: Error + Send + Sync + ' static ,
93
93
) -> Self {
94
94
self . source = Some ( Box :: new ( source) ) ;
95
95
self
0 commit comments