fix: weird extra space above definitions
This commit is contained in:
parent
4cad053e15
commit
14724f924c
|
@ -119,7 +119,7 @@ impl<'comments> Formatter<'comments> {
|
|||
end != 0
|
||||
}
|
||||
|
||||
fn definitions<'a>(&mut self, definitions: &'a [UntypedDefinition]) -> Vec<Document<'a>> {
|
||||
fn definitions<'a>(&mut self, definitions: &'a [UntypedDefinition]) -> Document<'a> {
|
||||
let mut has_imports = false;
|
||||
let mut has_declarations = false;
|
||||
let mut imports = Vec::new();
|
||||
|
@ -161,11 +161,11 @@ impl<'comments> Formatter<'comments> {
|
|||
nil()
|
||||
};
|
||||
|
||||
vec![imports, sep, declarations]
|
||||
docvec![imports, sep, declarations]
|
||||
}
|
||||
|
||||
fn module<'a>(&mut self, module: &'a UntypedModule) -> Document<'a> {
|
||||
let groups = join(self.definitions(&module.definitions), lines(2));
|
||||
let groups = self.definitions(&module.definitions);
|
||||
|
||||
// Now that `groups` has been collected, only freestanding comments (//)
|
||||
// and doc comments (///) remain. Freestanding comments aren't associated
|
||||
|
|
|
@ -1,5 +1 @@
|
|||
|
||||
|
||||
|
||||
|
||||
pub type ScriptContext { thing: String }
|
||||
|
|
|
@ -1,7 +1,3 @@
|
|||
|
||||
|
||||
|
||||
|
||||
pub type ScriptContext(purpose) { tx_info: TxInfo, script_purpose: purpose }
|
||||
|
||||
pub type TxInfo { idk: Int }
|
||||
|
|
|
@ -1,10 +1,6 @@
|
|||
use sample/context
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
pub type Mint { currency_symbol: ByteArray }
|
||||
pub type Mint { currency_symbol: ByteArray, thing: Int, thing: Int, thing: Int }
|
||||
|
||||
pub type ScriptContext =
|
||||
context.ScriptContext(Mint)
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
use sample/context
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
pub type Spend { idk: Int }
|
||||
|
||||
pub type ScriptContext =
|
||||
|
|
|
@ -1,10 +1,6 @@
|
|||
use sample/mint
|
||||
use sample/spend
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
pub type Datum { something: String }
|
||||
|
||||
pub type Redeemer {
|
||||
|
|
Loading…
Reference in New Issue