File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -258,8 +258,16 @@ impl std::error::Error for ParseError {}
258258
259259/// For set if it's $set NUMBER #COMMENT
260260impl MessageCatalog {
261- pub fn new ( build_default : bool ) -> Self {
262- let mut catalog = MessageCatalog {
261+ pub fn new (
262+ #[ cfg_attr( target_os = "macos" , allow( unused_variables) ) ] build_default : bool ,
263+ ) -> Self {
264+ #[ cfg( target_os = "macos" ) ]
265+ let catalog;
266+
267+ #[ cfg( not( target_os = "macos" ) ) ]
268+ let mut catalog;
269+
270+ catalog = MessageCatalog {
263271 cat : Cat {
264272 first_set : None ,
265273 last_set : None ,
@@ -459,6 +467,7 @@ impl MessageCatalog {
459467 }
460468 }
461469
470+ #[ cfg( not( target_os = "macos" ) ) ]
462471 fn compute_optimal_size ( & self ) -> ( usize , usize ) {
463472 let mut best_total = usize:: MAX ;
464473 let mut best_size = usize:: MAX ;
@@ -508,6 +517,7 @@ impl MessageCatalog {
508517 ( best_size, best_depth)
509518 }
510519
520+ #[ cfg( not( target_os = "macos" ) ) ]
511521 fn fill_arrays ( & self , array : & mut [ u32 ] , string_pool : & mut Vec < u8 > , best_size : usize ) {
512522 for set in self . cat . all_sets ( ) . iter ( ) . rev ( ) {
513523 let set = set. borrow ( ) ;
You can’t perform that action at this time.
0 commit comments