@@ -452,7 +452,9 @@ defmodule Membrane.ChildrenSpec do
452452 via_in ( builder , :input )
453453 end
454454 |> Builder . finish_link ( child_name )
455- |> then ( & % Builder { & 1 | children: [ child_spec | & 1 . children ] } )
455+ |> then ( fn % Builder { } = builder ->
456+ % Builder { builder | children: [ child_spec | builder . children ] }
457+ end )
456458 end
457459
458460 @ doc """
@@ -465,7 +467,9 @@ defmodule Membrane.ChildrenSpec do
465467 :ok = validate_pad_name ( pad )
466468
467469 get_child ( { Membrane.Bin , :itself } )
468- |> then ( & % Builder { & 1 | status: :from_pad , from_pad: pad , from_pad_props: % { } } )
470+ |> then ( fn % Builder { } = builder ->
471+ % Builder { builder | status: :from_pad , from_pad: pad , from_pad_props: % { } }
472+ end )
469473 end
470474
471475 @ doc """
@@ -488,7 +492,9 @@ defmodule Membrane.ChildrenSpec do
488492 else
489493 via_out ( builder , :output )
490494 end
491- |> then ( & % Builder { & 1 | status: :to_pad , to_pad: pad , to_pad_props: % { } } )
495+ |> then ( fn % Builder { } = builder ->
496+ % Builder { builder | status: :to_pad , to_pad: pad , to_pad_props: % { } }
497+ end )
492498 |> get_child ( { Membrane.Bin , :itself } )
493499 end
494500
@@ -541,7 +547,7 @@ defmodule Membrane.ChildrenSpec do
541547 "Invalid link specification: input #{ inspect ( pad ) } placed after another input"
542548 end
543549
544- def via_in ( % Builder { links: [ % { to: { Membrane.Bin , :itself } } | _ ] } , pad , _props ) do
550+ def via_in ( % Builder { links: [ % { to: { Membrane.Bin , :itself } } | _rest ] } , pad , _props ) do
545551 raise ParentError ,
546552 "Invalid link specification: input #{ inspect ( pad ) } placed after bin's output"
547553 end
@@ -572,7 +578,9 @@ defmodule Membrane.ChildrenSpec do
572578 else
573579 via_out ( builder , :output )
574580 end
575- |> then ( & % Builder { & 1 | status: :to_pad , to_pad: pad , to_pad_props: Enum . into ( props , % { } ) } )
581+ |> then ( fn % Builder { } = builder ->
582+ % Builder { builder | status: :to_pad , to_pad: pad , to_pad_props: Enum . into ( props , % { } ) }
583+ end )
576584 end
577585
578586 @ doc """
@@ -598,7 +606,7 @@ defmodule Membrane.ChildrenSpec do
598606 raise ParentError , "Invalid link specification: output #{ inspect ( pad ) } placed after an input"
599607 end
600608
601- def via_out ( % Builder { links: [ % { to: { Membrane.Bin , :itself } } | _ ] } , pad , _props ) do
609+ def via_out ( % Builder { links: [ % { to: { Membrane.Bin , :itself } } | _rest ] } , pad , _props ) do
602610 raise ParentError ,
603611 "Invalid link specification: output #{ inspect ( pad ) } placed after bin's output"
604612 end
0 commit comments