mirror of
https://github.com/Llewellynvdm/starship.git
synced 2024-11-16 01:57:07 +00:00
18 lines
427 B
Rust
18 lines
427 B
Rust
use super::{Context, Module};
|
|
use crate::segment::Segment;
|
|
|
|
/// Creates a module for the line break
|
|
pub fn module<'a>(context: &'a Context) -> Option<Module<'a>> {
|
|
const LINE_ENDING: &str = "\n";
|
|
|
|
let mut module = context.new_module("line_break");
|
|
|
|
module.set_segments(vec![Segment {
|
|
_name: "line_break".to_string(),
|
|
style: None,
|
|
value: LINE_ENDING.to_string(),
|
|
}]);
|
|
|
|
Some(module)
|
|
}
|