cleanup: Don't shadow variables
Having variables that share the same name in overlapping scopes is confusing and error-prone, and is best avoided. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/805
This commit is contained in:

committed by
Georges Basile Stavracas Neto

parent
2e4e2500dd
commit
682bd7e97c
@ -109,7 +109,7 @@ var AutomountManager = class {
|
||||
// mount operation object
|
||||
if (drive.can_stop()) {
|
||||
drive.stop(Gio.MountUnmountFlags.FORCE, null, null,
|
||||
(drive, res) => {
|
||||
(o, res) => {
|
||||
try {
|
||||
drive.stop_finish(res);
|
||||
} catch (e) {
|
||||
@ -118,7 +118,7 @@ var AutomountManager = class {
|
||||
});
|
||||
} else if (drive.can_eject()) {
|
||||
drive.eject_with_operation(Gio.MountUnmountFlags.FORCE, null, null,
|
||||
(drive, res) => {
|
||||
(o, res) => {
|
||||
try {
|
||||
drive.eject_with_operation_finish(res);
|
||||
} catch (e) {
|
||||
|
@ -115,7 +115,8 @@ var ContentTypeDiscoverer = class {
|
||||
|
||||
let hotplugSniffer = new HotplugSniffer();
|
||||
hotplugSniffer.SniffURIRemote(root.get_uri(),
|
||||
([contentTypes]) => {
|
||||
result => {
|
||||
[contentTypes] = result;
|
||||
this._emitCallback(mount, contentTypes);
|
||||
});
|
||||
}
|
||||
@ -166,7 +167,7 @@ var AutorunManager = class {
|
||||
if (!this._session.SessionIsActive)
|
||||
return;
|
||||
|
||||
let discoverer = new ContentTypeDiscoverer((mount, apps, contentTypes) => {
|
||||
let discoverer = new ContentTypeDiscoverer((m, apps, contentTypes) => {
|
||||
this._dispatcher.addMount(mount, apps, contentTypes);
|
||||
});
|
||||
discoverer.guessContentTypes(mount);
|
||||
|
@ -248,7 +248,7 @@ class TelepathyClient extends Tp.BaseClient {
|
||||
}
|
||||
|
||||
// Approve private text channels right away as we are going to handle it
|
||||
dispatchOp.claim_with_async(this, (dispatchOp, result) => {
|
||||
dispatchOp.claim_with_async(this, (o, result) => {
|
||||
try {
|
||||
dispatchOp.claim_with_finish(result);
|
||||
this._handlingChannels(account, conn, [channel], false);
|
||||
|
Reference in New Issue
Block a user